SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 List of all tables & columns in my db?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

jodders
Starting Member

United Kingdom
39 Posts

Posted - 02/27/2013 :  11:02:34  Show Profile  Reply with Quote
Hi guys,

I plan on having a clear up on my Database which has hundreds of tables that I have created and I really need to do a bit of housekeeping. Is there a way of displaying them via SQL or outputting them all into Excel?

Your help is most appreciated.

Thanks
Jodders

James K
Flowing Fount of Yak Knowledge

3575 Posts

Posted - 02/27/2013 :  11:20:41  Show Profile  Reply with Quote
Any of these.
SELECT * FROM INFORMATION_SCHEMA.TABLES;
SELECT * FROM INFORMATION_SCHEMA.COLUMNS;
SELECT * FROM sys.tables;
SELECT OBJECT_NAME(OBJECT_ID) AS TableName,* FROM sys.columns;

Go to Top of Page

jodders
Starting Member

United Kingdom
39 Posts

Posted - 02/28/2013 :  04:13:24  Show Profile  Reply with Quote
Cheers buddy, that did the trick
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000