Sql Server 表字段说明查询

Sql Server字段说明查询
select
A.name as table_name, --表名
B.name as column_name, --列名
C.value as column_description --列名备注
from sys.tables A
inner join sys.columns B on B.object_id = A.object_id
left join sys.extended_properties C on C.major_id = B.object_id and C.minor_id = B.column_id
where A.name = ‘你要查的表名’

你可能感兴趣的:(SQL,sqlserver)