티스토리 툴바


MSSQL 2011/12/05 08:18


Select o.object_id,  '[' + s.name + '].[' + o.name + ']' as dbname, 
    case when type = 'V' then 'View' when type = 'U' then 'Table' end as tablename,  
    cast(p.value as varchar(4000)) as MS_Description
    from sys.objects o 
     left outer join sys.schemas s on s.schema_id = o.schema_id 
     left outer join sys.extended_properties p on p.major_id = o.object_id and minor_id = 0 and p.name = 'MS_Description' 
    where type in ('U', 'V') 
    order by type, s.name, o.name
저작자 표시




Posted by 조조맹덕

TRACKBACK http://endlesol.tistory.com/trackback/26 관련글 쓰기

댓글을 달아 주세요