• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

尽管数据显示SQL服务器,为什么创建的表用红色加下划线

用户头像
it1352
帮助3

问题说明

大家好

我创建了包含数据的表格,并在使用select子句时显示正确的详细信息,但是表格下划线显示无效的对象名称...我们把光标靠近它。



使用创建表语法时发生了类似的错误,其中我使用了外键,引用的表格被加下划线RED,显示表中没有主键被引用..,后来我添加了主键,但带下划线的警告仍然存在,表创建虽然已经完成。



关于它们背后原因的任何想法以及我们如何解决它?



我尝试过:



我想知道我是否可以选择附上截图供审阅:(

Hi All
I have created tables which has data, and are displaying correct details upon using the select clause, However the table is being underlined with RED displaying "Invalid object name..." if we bring the cursor near to it.

A similar kind of error occurred while using the creating table syntax, where i used foreign key , the referenced table was being underlined as RED, displaying "There is no primary key in table being referenced..", later i added the Primary key, but the underlined warning was still there and the table creation was done although.

Any ideas on the reasons behind them and how do we resolve it??

What I have tried:

I was wondering if i had the option to attach a screenshot for review:(

正确答案

#1
忽略它。

SSMS不会经常刷新它的窗口:我经常会查询运行的红色下划线并产生我想要的结果。

如果它真的困扰你,将整个查询复制到剪贴板,打开一个新的查询窗口并粘贴它。下划线将消失,因为新的查询窗口已加载使用新的表定义。
Ignore it.
SSMS doesn't refresh it's windows often: I often have queries with red underlines that run and produce the results I want.
If it really bothers you, copy the whole query to the clipboard, open a new query window and paste it in. The underline will vanish because the new query window was loaded with the new table definitions.

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /reply/detail/tanhcbbieg
系列文章
更多 icon
同类精品
更多 icon
继续加载