我有一个表,它的 id 既是表的标识又是表的主键。当运行这个
Use devdb
Select * from tablename order by did desc
有效,我看到了数据。当我运行以下命令时,我看到列表中的表格
Use devdb
SELECT * FROM information_schema.tables order by TABLE_NAME
但是当我运行这个时:
Use devdb;
DBCC CHECKIDENT ('<TableName>.<ColumnName>', RESEED, 100000);
我明白了
Msg 2501, Level 16, State 45, Line 2
Cannot find a table or object with the name "<tablename>.<columnname>". Check the system catalog.
有谁知道为什么?