标签:color objects type select val 表名 导出数据 desc object
SELECT
(case when a.colorder=1 then d.name else ‘‘ end) 表名,
a.colorder 字段序号,
a.name 字段名,
b.name 字段类型,
b.length 字段长度,
g.[value] AS 字段说明
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 sys.extended_properties g
on a.id=g.major_id AND a.colid = g.minor_id
--WHERE d.[name] <>‘table_desc‘ --你要查看的表名,注释掉,查看当前数据库所有表的字段信息
--WHERE d.[name] =‘CityHot‘--你要查看的表名,注释掉,查看当前数据库所有表的字段信息
order by a.id,a.colorder
标签:color objects type select val 表名 导出数据 desc object
原文地址:http://www.cnblogs.com/beagreatman/p/6644403.html