Dropping Constraints using ONLINE

Viewed 198

I wanted to understand that if we drop a PRIMARY KEY using online then what will be the situation for ongoing transactions. Will the maintain data integrity? ideally not cause we have dropped PK. But what could be the real scenario from dropping constraints using online or how we can prevent data conflicts while doing so.

1 Answers

In Oracle, you can keep index but drop Primary Key. In this way you can prevent data conflicts.

ALTER TABLE TBL DROP PRIMARY KEY KEEP INDEX

after that you can add new primary key or unique constraint (whatever it is) and drop former unique constraint

Related