.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month

Home >> Code Snippets >> SQL Query >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

List All the Tables for All Databases Using System Tables-SqlServer

Posted By:Syed Shakeer Hussain       Posted Date: March 17, 2010    Points: 10    Category: SQL Query    URL: http://www.dotnetspark.com  

simple script which will list all the tables for all the database.

copy and paste the below script in Sql Query Analyzer and run it

sp_msforeachdb 'select "?" AS db, * from [?].sys.tables'


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend