Solved

Retrieving table and column descriptions from SQL Server

Posted on 2004-09-01
2
273 Views
Last Modified: 2006-11-17
In SQL Server's Enterprise manager I enter a line of documentation for each new table and column that I create.

 Is there an easy way to retrieve this information from the database such that it may be included in our system documentation?
0
Comment
Question by:pcpaasche
[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 Comments
 
LVL 10

Accepted Solution

by:
Jay Toops earned 125 total points
ID: 11951724
See if this gives you what you need.

select so.name as [table] , sc.name as [type], st.name as [subtype], sc.length, sp2.name as xtype, sp2.value as comment
from sysobjects as so
inner join syscolumns as sc
on sc.id = so.id
inner join systypes as st
on sc.xusertype = st.xusertype
left outer join sysproperties as sp2
on sp2.id = so.id
and sp2.type = 4
and sp2.smallid = sc.colid
where so.xtype='u'
order by so.name

Try this query

Jay
0
 

Author Comment

by:pcpaasche
ID: 11956673
Thanks. I will try it out when I am back at the office on monday.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Viewers will learn how the fundamental information of how to create a table.

717 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