as select (case when b.colorder=1 or b.colorder is null then a.name else '' end) as n'表名' ,b.name as n'字段名' ,c.name as n'數(shù)據(jù)類型' ,b.prec as n'長度',(case when b.colstat=4 then '√'else '' end) n'是否輸出', b.colorder n'字段序號',(case when b.colorder=1 or b.colorder is null then d.text else '' end) as n'內(nèi)容' from sysobjects a left join syscolumns b on b.id=a.id left join systypes c on (c.xtype=b.xtype and c.name<>'sysname') left join syscomments d on d.id= a.id where a.schema_ver=0 and a.xtype='p' order by a.name,b.colorder return -- by huntfox