简单地获取sql server 数据库中字段的注释
select cast(b.value as varchar) comment
from sys.tables a, sys.extended_properties b
where a.type='U'
and a.object_id=b.major_id
and b.minor_id!=0 //等于0,则为查询表注释
and a.name='table' //这里可以传入相应的表名,以查询特定表中的字段注释
select cast(b.value as varchar) comment
from sys.tables a, sys.extended_properties b
where a.type='U'
and a.object_id=b.major_id
and b.minor_id!=0 //等于0,则为查询表注释
and a.name='table' //这里可以传入相应的表名,以查询特定表中的字段注释