如果作者沒有指定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')