Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Drop and re create constraints

3231891Sep 11 2016 — edited Sep 11 2016

Hi There,

I have a task of dropping partitions on a table in QA environment but maintain the data in it. So, I started with creating test tables based on the original tables.

So, when I have this test table, the partitions are gone. But the problem is constraints are also gone.

When I try to re create the constraints, I get the error that the constraint name already exists. (This is understandable).

So, when I try to drop constraints on the original table and recreate them on the test tables, there are multiple table's foreign keys being referenced.

Is there a way I can alter the constraints with any script rather than going through all the tables being referenced?

Any help in this regard is much appreciated!

Thanks in advance!

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 9 2016
Added on Sep 11 2016
7 comments
1,224 views