当你的才华不能撑起你的野心时,就是你该选择学习的时候了!

SQL Server取表名列名列描述

select so.name as TableName,sc.name as ColumnName,ep.name as PropertyName,ep.value as Description
            from sys.objects so
            left join sys.columns sc on so.object_id = sc.object_id
            left join sys.extended_properties ep on sc.object_id = ep.major_id and sc.column_id = ep.minor_id
            order by so.name,sc.column_id

 

posted @ 2024-01-16 15:21  hofmann  阅读(13)  评论(0编辑  收藏  举报