您的位置:首页 > 数据库

查看数据库表结构

2014-03-14 08:59 330 查看
select b.name,b.is_identity,c.name, case when c.name in('char','varchar','nchar','nvarchar') then '('+rtrim(b.max_length)+')' else '' end + case when b.is_nullable=0 then ' not null' else ',' end from sys.tables a inner join sys.columns b on a.object_id=b.object_id
inner join sys.types c on b.system_type_id=c.system_type_id where a.name='Fields' order by b.column_id
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: