Solved

System SP to view table structure

Posted on 2006-07-13
5
1,574 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
[X]
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
  • 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

Comparison of Amazon Drive, Google Drive, OneDrive

What is Best for Backup: Amazon Drive, Google Drive or MS OneDrive? In this free whitepaper we look at their performance, pricing, and platform availability to help you decide which cloud drive is right for your situation. Download and read the results of our testing for free!

Question has a verified solution.

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

A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
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.

705 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