1.查询表名或列名中文注释(sqlserver 2008)
select t.object_id,t.name, p.value from sys.tables t join sys.extended_properties p on t.object_id = p.major_id and p.name = ‘MS_Description‘ and p.minor_id=0 ;
1.1查询表名中文注释
select t1.*,t2.name as column_name from (select t.object_id,p.major_id,p.minor_id,t.name as tables_name, p.value,t.type,t.type_desc from sys.tables t join sys.extended_properties p on t.object_id = p.major_id and p.name = ‘MS_Description‘) t1 left join syscolumns t2 on t1.object_id=t2.id and t1.minor_id=t2.colid ;
1.2查询出表名及列名中文
时间: 2024-11-01 20:10:34