如果作者没有指定DEFAULT约束名,那么系统会自动命名,可以用以下语句获得该DEFAULT约束名:
select name from sys.default_constraints
where parent_object_id=object_id('表名')
and parent_column_id=columnproperty(object_id('表名'),'列名','columnid')
如果作者没有指定DEFAULT约束名,那么系统会自动命名,可以用以下语句获得该DEFAULT约束名:
select name from sys.default_constraints
where parent_object_id=object_id('表名')
and parent_column_id=columnproperty(object_id('表名'),'列名','columnid')