sql查找表中列的属性

来源:互联网 发布:显示器色彩测试软件 编辑:程序博客网 时间:2024/06/07 12:05


select a.name columnname,c.name as typename, 
case when a.is_nullable = 0 then 'Not Null' else 'Null' end as nullable,
a.*from sys.columns a ,
 sys.objects b, 
 sys.types c
 where a.object_id = b.object_id 
 and b.name='Product'and 
 a.system_type_id=c.system_type_id order by a.column_id
原创粉丝点击