首页 > 代码库 > SQL Server DBA-日常查询视图
SQL Server DBA-日常查询视图
1.查询表名或列名中文注释(sqlserver 2008)
select t.object_id,t.name, p.value from sys.tables tjoin sys.extended_properties p on t.object_id = p.major_id and p.name = ‘MS_Description‘and p.minor_id=0;
select t1.*,t2.name as column_namefrom (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 tjoin 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;
SQL Server DBA-日常查询视图
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。