Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Querying the Column Description
Message
 
To
18/01/2007 14:09:13
General information
Forum:
Microsoft SQL Server
Category:
Database management
Miscellaneous
Thread ID:
01186774
Message ID:
01186782
Views:
20
>When creating table columns ( through the IDE ), one of the optional paramters that can be entered is the column's "Description". Where is the "Description" data for the column stored and is it possible to query it? If so, how?
>
>I have tried sp_columns and sp_columns_rowset and neither produces this column data. The output sp_columns_rowset contains a "Description" column but the values in it are always NULL.
>
>Thanks,
>Bill

This works on SQL 2005 (I can't test it right now on SQL 2000)
SELECT *
 FROM sys.extended_properties 
LEFT JOIN INFORMATION_SCHEMA.Columns
ON OBJECT_NAME(Major_Id) = INFORMATION_SCHEMA.Columns.Table_Name AND
   Minor_Id = INFORMATION_SCHEMA.Columns.Ordinal_Position
WHERE Class = 1
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform