Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 Script Library
 Description Properties in SQL 2000

Author  Topic 

Merkin
Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 2001-07-15 : 02:21:23
A query to get the Table and Column Description fields in SQL Server 2000.


SELECT so.name, sc.name, sc.xtype, sc.length, sc.colid,
tableprop.value as TableDescription,
colprop.value as ColDescription

FROM

sysobjects so

INNER JOIN syscolumns sc ON sc.id = so.id
INNER JOIN sysproperties tableprop ON tableprop.id = so.id and tableprop.type = 3
INNER JOIN sysproperties colprop ON colprop.id = sc.id and colprop.type = 4
and colprop.smallid = sc.colid

WHERE so.type='u' and so.name = 'TableName'

Order by sc.ColID





Damian

mattew
Starting Member

9 Posts

Posted - 2003-01-15 : 04:03:41
it's very very good but the result in the field ColDescription is "<binary>". What is it?

Go to Top of Page
   

- Advertisement -