摘要:
select a.[name] tName,b.[name] columnName,b.xtype columnType,b.[type],b.Length,b.prec,b.IsNullable,b.colorder,(case when pk.COLUMN_NAME is null then 0 else 1 end) PKfrom sysobjects a left join syscolumns b on a.id=b.id left join [INFORMATION_SCHEMA].KEY_COLUMN_USAGE pkon pk.Table_Name=a.[name] and p 阅读全文