SELECT a.object_id AS TABLE_ID, a.name AS TABLE_NAME, b.name AS COLUMN_NAME, b.column_id AS COLUMN_ID, c.value AS DESCRIPTION
FROM sys.objects a
LEFT JOIN sys.columns b ON a.object_id=b.object_id
LEFT JOIN sys.extended_properties c ON (a.object_id=c.major_id AND b.column_id=c.minor_id)
where a.name = '테이블명'
ORDER BY a.object_id, b.column_id;
'programming > mssql' 카테고리의 다른 글
join update/delete (0) | 2013.04.02 |
---|---|
MSSQL 자동증가 컬럼 테이블 복사 (0) | 2013.02.26 |
insert into select (0) | 2013.02.19 |
row 데이터 합치기 (1) | 2013.01.17 |
SQL Server 2005의 OVER절 (0) | 2012.12.24 |