select [表名]=c.Name, [表说明]=isnull(f.[value],''), [列名]=a.Name, [列序号]=a.Column_id, [标识]=case when is_identity=1 then '√' else '' end, [主键]=case when exists(select 1 from sys.objects x join sys.indexes y on x.Type=N'PK' and x.Name=y.Name join sysindexkey…