Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Describe a database

Status
Not open for further replies.

cphill7292

Programmer
Oct 29, 2003
3
GB
In Oracle there is the commmand desc which is used to describe all the colums in a specified database. My question is, is there a similar command in SQL Server
 
look at the INFORMATION_SCHEMA views
or at syscolumns (Contains one row for every column in every table and view, and a row for each parameter in a stored procedure. This table is in each database.)


“I sense many useless updates in you... Useless updates lead to fragmentation... Fragmentation leads to downtime...Downtime leads to suffering..Fragmentation is the path to the darkside.. DBCC INDEXDEFRAG and DBCC DBREINDEX are the force...May the force be with you" --
 
I use sp_help 'tablename'

That will give you a listing of all columns, indexes, etc for a given table.

Also, select text view instead of grid view when running this, easier to read.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top