为落实数据库规范,既每个表字段都需要有comment注释,所以需要过滤生产表中没有comment的字段,搜索出还不错的过滤语句 show full columns from table where Comment='' ; show clumns的语法如下 SHOW [FULL] COLUMNS {FROM | IN} tbl_name [{FROM | IN} db_name] [LIKE 'pattern' | WHERE expr] 然后结合shell脚本就可以轻松批量过滤出没有注释的表字…
declare @t varchar(255),@c varchar(255) declare table_cursor cursor for select a.name,b.name from sysobjects a,syscolumns b ,systypes c where a.id=b.id and a.xtype='u' and b.xtype=c.xtype and c.name in ('char', 'nchar', 'nvarchar', 'varchar','tex…