SQL Server – sp_help – View Table Structure

View the Table Structure

sp_help is a stored procedure used for reporting system information. It is extensively used for displaying the structure of a table.

We shall use Customer table for the demo:

Customer Table

Customer Table

To get detailed information about Customer table execute the following command.

sp_help Customer;

Customer Table Details

The result is seven sets of information about the Customer table, including the following:

  • Name, creation date, and owner
  • Columns
  • Identity columns
  • Row GUID columns
  • FileGroup location
  • Indexes
  • Constrains
Advertisements

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

%d bloggers like this: