Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Print Out SQL Table Information

Posted on 2014-01-14
3
Medium Priority
?
358 Views
Last Modified: 2014-01-14
I need a print out that describes all the fields, datatype and character size of a table in our sql 2005 server. Is this a built in function of sql server?
0
Comment
Question by:mickeyshelley1
[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
3 Comments
 
LVL 25

Accepted Solution

by:
Lee Savidge earned 2000 total points
ID: 39779487
sp_help 'tablename'
0
 
LVL 85
ID: 39779522
Not really, but you can use TSQL to get a lot of info:
SELECT     so.name AS [Table], sc.name AS [Column], st.name AS DataType, sc.isnullable AS [Nullable?]
FROM         sys.sysobjects AS so INNER JOIN
                      sys.syscolumns AS sc ON sc.id = so.id INNER JOIN
                      sys.systypes AS st ON sc.xtype = st.xtype
WHERE     (so.type = 'u')

Open in new window

There are also 3rd party utilities that will do this.
0
 

Author Closing Comment

by:mickeyshelley1
ID: 39779657
Thanks
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

721 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