Select 表名=Case When A.ColOrder=1 Then D.Name Else '' End, 字段序號=A.ColOrder, 字段名=A.Name, 標識=Case When COLUMNPROPERTY( A.ID,A.Name,'IsIdentity')=1 Then '√'Else '' End, 主鍵=Case When exists(Select 1 From sysobjects where Xtype='PK' And Name In ( Select Name From sysindexes Where indid In( Select indid From sysindexkeys Where ID = A.ID AND colid=A.colid ))) Then '√' Else '' End, 類型=B.Name,