开发者

retrieving empty record from informationschema. WHY?

SELECT * FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS 

Above SQL is 开发者_开发技巧not showing any data while 20minutes ago it was showing all the records, just fine! How is that even possible?


Are you running it against the right database?

When I run the query against my Master dtatabase, I get no results, but when I run it against a different DB I get results.

If you're using Sql Server Management Studio, put a USE <database name that you want to run this against> statement before this query.

For example, if the DB name is "sales" then put

USE SALES
GO
SELECT * FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜