Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 how to get a list of all tables in all database on

Author  Topic 

alpoor
Starting Member

29 Posts

Posted - 2007-02-09 : 12:01:53
how to get a list of all tables in all database on a single server

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-02-09 : 12:33:04
EXEC sp_MSforeachdb "SELECT '?' AS dbName, table_name FROM information_schema.tables WHERE table_type = 'BASE TABLE'"




Go with the flow & have fun! Else fight the flow
blog thingie: http://weblogs.sqlteam.com/mladenp
Go to Top of Page
   

- Advertisement -