Rename a constraint in SQL Server?

前端 未结 5 592
迷失自我
迷失自我 2020-12-14 14:33

Is it possible to rename a constraint in SQL Server? I don\'t want to have to delete and create a new one because this constraint affects other already existing constraints

5条回答
  •  时光说笑
    2020-12-14 14:50

    answer is true :

    exec sp_rename 
    @objname = 'Old_Constraint',
    @newname = 'New_Constraint',
    @objtype = 'object'
    

提交回复
热议问题