select c.name,cast(isnull(f.[value], '') as nvarchar(100)) as remark from sys.objects c left join sys.extended_properties f on f.major_id=c.object_id and f.minor_id=0 and f.class=1 where c.type='u'
查询字段名,属性和备注:
select a.name,a.system_type_id as type, cast(isnull(e.[value],'') as nvarchar(100)) as remark
from sys.columns a inner join sys.objects c on a.object_id=c.object_id and c.type='u'
left join sys.extended_properties e on e.major_id=c.object_id
and e.minor_id=a.column_id and e.class=1 where c.name=?
在这里使用jdbc连接时会出现: