Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

System SP to view table structure

Posted on 2006-07-13
5
1,568 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 143

Expert Comment

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

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

856 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