查询表中某个字段的约束名称
declare @name varchar(50) select b.name from sysobjects b join syscolumns a on b.id = a.cdefault where a.id = object_id('表') and a.name ='列'
结果示例
name |
DF__dus_cou__userp__257252FF |
微信扫码查看本文
查询表中某个字段的约束名称
declare @name varchar(50) select b.name from sysobjects b join syscolumns a on b.id = a.cdefault where a.id = object_id('表') and a.name ='列'
name |
DF__dus_cou__userp__257252FF |
发表评论