select a.name, b.name + ‘(‘+ convert(varchar,a.length) + ‘)‘ + case a.isnullable when 1 then ‘ Null‘ else ‘‘ end as [type], ‘‘ as Pretty from syscolumns a join systypes b on (a.xusertype = b.xusertype) where a.id = object_id(‘TableName‘) Order By a.ColOrder
得到结果为:
时间: 2024-10-11 13:57:52