i have change table name but constraint name is old, need to change constraint or any impact if table name is different but constraint name is old table name
Change Constraint
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Sachin SinghRank #66 · 26.2K reputationPosted Jan 6, 2023, 1:49 AM EST
Have you faced any issue so far?
Table name change will have also updated the apporpriate Metadata in the system catalogs and so the constraint will still be referencing the correct table, so you should not get any trouble.
Aravind GovindarajRank #430 · 5.8K reputationPosted Jan 6, 2023, 8:22 AM EST
Basically, it's good to follow the custom naming convention while creating constraints like "UQ__" instead of creating automatically.
We faced the same sort of scenario in my previous project. We created a script where it will delete all the auto-created constraint name(s) and with the help of the script you can create exactly the same as previously with the changed table name.
The steps we followed while doing this activity
Hope this helps you ...
Aradhana TripathiRank #509 · 4.8K reputationPosted Jan 24, 2023, 11:05 AM EST
There will be no impact on table data, however the name of constraint may contain text of old table name and it may be confusing in future.