Solved

Show Tables, Explain TableName

Posted on 2007-04-10
2
664 Views
Last Modified: 2009-12-16
With MySQL there is a command, "show tables" that lists all the tables in a selected database. MySQL also has "explain tablename" which gives the column information about the tablename entered.

Is there something similar to this in SQL Server 2005? If not how else can I get table/column information about a specific database?
0
Comment
Question by:craigdev
2 Comments
 
LVL 50

Accepted Solution

by:
Lowfatspread earned 500 total points
ID: 18881704
you can use the information schema  views to get the information...

select * from information_schema.tables
 
or

select * from information)schema.columns
 where table_name = 'xxxxx'
  and table_schema = 'dbo'
 order by table_name,table_schema,ordinal_position
0
 
LVL 1

Author Comment

by:craigdev
ID: 18881711
awesome thanks
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
In SQL Server, when rows are selected from a table, does it retrieve data in the order in which it is inserted?  Many believe this is the case. Let us try to examine for ourselves with an example. To get started, use the following script, wh…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

912 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now