How to Describe Table in MS SQL Server

Unlike Oracle or MySQL there is no DESCRIBE or DESC command to describe a table or object in MS SQL Server. But to describe a table or object MS SQL Server provides a very useful command or built-in stored procedure sp_help.  One can easily describe an object using this command.  You can use this command in the following ways:

> sp_help ‘your_object_name’ or
>
sp_help your_oject_name
The first method is more useful because you can specify db/schema name here. Here is the command along with output:
sp_help ‘dbo.Sales’
Output:
Output of sp_help command

More info  is available here

Advertisements

2 thoughts on “How to Describe Table in MS SQL Server

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s