标签:
sqlCode
SELECT 字段序号 = a.colorder, 字段名 = a.name, 类型 = b.name, 长度 = COLUMNPROPERTY(a.id,a.name,‘PRECISION‘), 字段说明 = isnull(g.[value],‘‘), 是否允许空 = case when a.isnullable=1 then ‘√‘else ‘‘ end, 默认值 = isnull(e.text,‘‘) FROM syscolumns a left join systypes b on a.xusertype=b.xusertype inner join sysobjects d on a.id=d.id and d.xtype=‘U‘ and d.name<>‘dtproperties‘ left join syscomments e on a.cdefault=e.id left join sys.extended_properties g on a.id=G.major_id and a.colid=g.minor_id left join sys.extended_properties f on d.id=f.major_id and f.minor_id=0 where d.name=‘table‘ ---修改表名称 order by a.id,a.colorder
标签:
原文地址:http://www.cnblogs.com/Jowen/p/4434928.html