sqlserver get column description
علی ذوالفقار
1402/05/01 12:49:01 (307)
SELECT
ST.NAME [TABLE],
SC.NAME [COLUMN],
SEP.VALUE [DESCRIPTION]
FROM SYS.TABLES ST
INNER JOIN
SYS.COLUMNS SC ON ST.OBJECT_ID = SC.OBJECT_ID
LEFT JOIN
SYS.EXTENDED_PROPERTIES SEP ON
ST.OBJECT_ID = SEP.MAJOR_ID
AND SC.COLUMN_ID = SEP.MINOR_ID
AND SEP.NAME = 'MS_DESCRIPTION'