时间:2021-07-01 10:21:17 帮助过:63人阅读
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
得到结果为:
获取SQL SERVER数据库表结构
标签:表结构 数据库 sql server