SQL Server DBA-日常查询视图
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了SQL Server DBA-日常查询视图相关的知识,希望对你有一定的参考价值。
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 ;
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 ;
以上是关于SQL Server DBA-日常查询视图的主要内容,如果未能解决你的问题,请参考以下文章