每一个数据表 添加一个 扩展 属性:Description 填写表描述。
查看是否所有表都添加的Sql如下:
SELECT a.name AS name, g.[value] FROM sys.tables a LEFT JOIN (SELECT * FROM sys.extended_properties WHERE NAME='Description' ) g ON (a.object_id = g.major_id AND g.minor_id = 0) WHERE a.name NOT IN('sysdiagrams','ASPStateTempSessions','ASPStateTempApplications') AND g.value IS NULL ORDER BY a.name
查看所有表名称描述:
SELECT a.name AS name, g.[value] FROM sys.tables a LEFT JOIN (SELECT * FROM sys.extended_properties WHERE NAME='Description' ) g ON (a.object_id = g.major_id AND g.minor_id = 0) WHERE a.name NOT IN('sysdiagrams','ASPStateTempSessions','ASPStateTempApplications') ORDER BY a.name