• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 367
  • Last Modified:

Print Out SQL Table Information

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
mickeyshelley1
Asked:
mickeyshelley1
1 Solution
 
Lee SavidgeCommented:
sp_help 'tablename'
0
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
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
 
mickeyshelley1Author Commented:
Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now