Solved

System SP to view table structure

Posted on 2006-07-13
5
1,566 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
ID: 17097245
sp_columns 'tablename'
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 17097247
sp_helptable 'tablename'
0
 
LVL 142

Expert Comment

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

Expert Comment

by:Aneesh Retnakaran
ID: 17097253
Also you can use ,
Sp_help 'tablename'
0
 

Author Comment

by:vj_mi
ID: 17097478
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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

810 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