Solved

System SP to view table structure

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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Query Peformance + mulitple query plans 9 48
How to upload /Create/manage SQL database on Azure 3 32
SQL Error in WHERE Clause 5 41
Query / Window function ? 3 18
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Viewers will learn how the fundamental information of how to create a table.

895 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

18 Experts available now in Live!

Get 1:1 Help Now