Hello,
I am trying to figure out how to pull object/column info from the system tables. I have figured most of it out, but I cannot figure out how to pull in the Description property for a table column. Thoughts?? Here is what I have so far:
SELECT o.name AS ObjectName, o.id AS ObjectId, c.name AS ColumnName, c.colid AS ColumnSequence, t.name AS ColumnDataType, c.length AS ColumnLength, c.prec AS ColumnPrecision, c.isnullable AS ColumnNullable, c.cdefault AS ColumnDefault
FROM sysobjects o INNER JOIN
syscolumns c ON o.id = c.id INNER JOIN
systypes t ON c.xtype = t.xtype
WHERE (o.name LIKE 'tbl%')
ORDER BY o.name, c.colid
Thanks.
I am trying to figure out how to pull object/column info from the system tables. I have figured most of it out, but I cannot figure out how to pull in the Description property for a table column. Thoughts?? Here is what I have so far:
SELECT o.name AS ObjectName, o.id AS ObjectId, c.name AS ColumnName, c.colid AS ColumnSequence, t.name AS ColumnDataType, c.length AS ColumnLength, c.prec AS ColumnPrecision, c.isnullable AS ColumnNullable, c.cdefault AS ColumnDefault
FROM sysobjects o INNER JOIN
syscolumns c ON o.id = c.id INNER JOIN
systypes t ON c.xtype = t.xtype
WHERE (o.name LIKE 'tbl%')
ORDER BY o.name, c.colid
Thanks.