开发者

What is the simplest way to enumerable tables, views and SPs of a database

What is the best way to enumerate开发者_如何转开发 tables, views and stored procedures using ADO.NET?

Of course, one can query the master table.

Is there a simpler and more standard way? And possibly, would work on all databases.


Assuming SQL Server you'd query sys.objects from your code if you want "simple "

Do you want a straight list? Or full definitions too?


Information schema is an ANSI standard.

SELECT * FROM INFORMATION_SCHEMA.TABLES
SELECT * FROM INFORMATION_SCHEMA.VIEWS
SELECT * FROM INFORMATION_SCHEMA.ROUTINES
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜