Solved

System SP to view table structure

Posted on 2006-07-13
5
1,563 Views
Last Modified: 2010-05-19
Just like we use sp_helptext from Query analyzer to view SP details, which SP will allow me to view table structure from SQL Query Analyzer?

Regards,
MI
0
Comment
Question by:vj_mi
  • 2
  • 2
5 Comments
 
LVL 75

Accepted Solution

by:
Aneesh Retnakaran earned 125 total points
Comment Utility
sp_columns 'tablename'
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
Comment Utility
sp_helptable 'tablename'
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
Comment Utility
you can also use the following query:
select * from information_schema.columns where tablename = 'table name'
0
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
Comment Utility
Also you can use ,
Sp_help 'tablename'
0
 

Author Comment

by:vj_mi
Comment Utility
sp_helptable 'tablename' and select * from information_schema.columns where tablename = 'table name' gave me error. But sp_columns 'tablename' and Sp_help 'tablename' worked.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Introduced in Microsoft SQL Server 2005, the Copy Database Wizard (http://msdn.microsoft.com/en-us/library/ms188664.aspx) is useful in copying databases and associated objects between SQL instances; therefore, it is a good migration and upgrade tool…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

762 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

7 Experts available now in Live!

Get 1:1 Help Now