SELECT 表名=case when a.colorder=1 then d.name else '' end,
表描述=case when a.colorder=1 then isnull(f.value,'') else '' end,
字段序号=a.colorder,
类型=b.name,
长度=a.length,
字段名=a.name,
字段描述=isnull(g.[value],'')
FROM syscolumns a
left join systypes b on a.xtype=b.xusertype
inner join sysobjects d on a.id=d.id and d.xtype='U' and d.name<>'dtproperties'
left join sysproperties g on a.id=g.id and a.colid=g.smallid
left join sysproperties f on d.id=f.id and f.smallid=0
where d.name='查询的表名'