728x90
SELECT a.[name] as '테이블 이름',
b.[name] as '열 이름',
b.[length] as '데이터 길이',
c.[name] as '데이터 형식',
isnull(d.[value],'') as'설명'
FROM
sysobjects a
INNER JOIN
syscolumns b
ON a.id = b.id
INNER JOIN
systypes c
ON b.xusertype = c.xusertype
LEFT OUTER JOIN
sys.extended_properties d
ON b.id = d.major_id and b.colid = d.minor_id
WHERE a.[name] = 'Table_name' -- 테이블 이름

+ Recent posts