开发者

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

开发者 https://www.devze.com 2023-03-06 17:06 出处:网络
What is the best way to enumerate开发者_如何转开发 tables, views and stored procedures using ADO.NET?

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

精彩评论

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