代码如下:SELECT (case when a.colorder=1 then d.name else ” end) as 表名,–如果表名相同就返回空 syscolumns(表字段信息表) a sysobjects d a.colorder as 字段序号, a.name as 字段名, (case when COLUMNPROPERTY( a.id,a.name, ‘IsIdentity’ )=1 then ‘√’ else ” end) as 标识, –返回IsIdentity的值,IsIdentity只有两个值:0、1 (