Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Seeking System Table for Comments 1

Status
Not open for further replies.

MKVAB

Programmer
Dec 2, 2003
86
0
0
US
Anybody know which system table contains the actual comments for tables? I can find stored procedure text and column defaults in syscomments, but not the actual attribute's comments.

Ideas?

Thanks!
-MK
 
If you think about column comments, these are extended properties - table sysproperties, sql_variant data. Also see fn_listextendedproperty() function in BOL.
 
Thank you!!!
Exactly what I was looking for!


For others: here's a query to grab the column and table name.

Code:
select sysobjects.name TableName,
       syscolumns.name ColumnName,
       sysproperties.Value ColumnComment
from   syscolumns
       inner join sysproperties
          on syscolumns.id = sysproperties.id
         and syscolumns.colid = sysproperties.smallid
       inner join sysobjects
          on syscolumns.id = sysobjects.id
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top