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
精彩评论