基于SQL2005 SQL2008 表结构信息查询升级版的详解(含外键信息)
SELECT 表名=CASE WHEN a.colorder = 1 THEN d.name ELSE ” END, 表说明=CASE WHEN a.colorder = 1 THEN isnull(f.value, ”) ELSE ” END , 字段序号=a.colorder , 字段名=a.name , 标识=CASE WHEN COLUMNPROPERTY(a.id, a.name, ‘IsIdentity’) = 1 THEN ‘√’ ELSE ” END , 主键=CASE WHEN EXISTS ( SELECT 1 FROM dbo.sysindexes si INN
用户评论