SQL 服务器对象名称无效 'TableName' SSMS,系统中 Table
SQL server Invalid object name 'TableName' SSMS , Table in system
我正在研究 SQL Server Management Studio。我想打开一个已经在 SSMS 中的 table。我收到以下错误。 table 反映在我的 table 中。
数据库:消费者投诉包含 2 tables:dbo.Consumer_Complaints 和 dbo.RAW P9 -消费者投诉。
我正在尝试打开 dbo.Consumer_Complaints table.
Msg 208, Level 16, State 1, Line 1
Invalid object name 'dbo.Consumer_Complaints'.
Completion time: 2020-04-22T10:17:50.5134070+05:30
目前尝试的步骤:
CTR
+ SHIFT
+ R
在查询 window
在查询 window 中放入光标后,我还去了 Edit
-> Intellisense
-> Refresh local cache
。仍然没有结果
编辑:评论后
SELECT * FROM [Consumer Complaints]
这个也有错误
Msg 208, Level 16, State 1, Line 1 Invalid object name 'Consumer
Complaints
特 运行
使用【消费者投诉】
在你的 select 语句之前让 smss 知道要使用哪个数据库方案
你可以先select数据库名:
use [Consumer Complaints]
select * from dbo.Consumer_Complaints
但是,您也可以 运行 select 语句:
select *
from [Consumer Complaints].dbo.Consumer_Complaints
您尝试对 "Master" 数据库执行查询。您可以在 UI 上更改当前数据库
或添加SQL查询:
USE 'Consumer Cmplaints'
我正在研究 SQL Server Management Studio。我想打开一个已经在 SSMS 中的 table。我收到以下错误。 table 反映在我的 table 中。
数据库:消费者投诉包含 2 tables:dbo.Consumer_Complaints 和 dbo.RAW P9 -消费者投诉。 我正在尝试打开 dbo.Consumer_Complaints table.
Msg 208, Level 16, State 1, Line 1
Invalid object name 'dbo.Consumer_Complaints'.
Completion time: 2020-04-22T10:17:50.5134070+05:30
目前尝试的步骤:
CTR
+ SHIFT
+ R
在查询 window
在查询 window 中放入光标后,我还去了 Edit
-> Intellisense
-> Refresh local cache
。仍然没有结果
编辑:评论后
SELECT * FROM [Consumer Complaints]
这个也有错误
Msg 208, Level 16, State 1, Line 1 Invalid object name 'Consumer
Complaints
特 运行 使用【消费者投诉】 在你的 select 语句之前让 smss 知道要使用哪个数据库方案
你可以先select数据库名:
use [Consumer Complaints]
select * from dbo.Consumer_Complaints
但是,您也可以 运行 select 语句:
select *
from [Consumer Complaints].dbo.Consumer_Complaints
您尝试对 "Master" 数据库执行查询。您可以在 UI 上更改当前数据库
或添加SQL查询:
USE 'Consumer Cmplaints'