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!

Ignore unique constraint in updates

461913Mar 22 2007 — edited Mar 22 2007

Hi,
I just want to know is there any oracle command to do something like this.
I have a table which has the person_id as primary key and its a unique constraint. There is a index on that too.
I want to run an update like this

UPDATE person_tabale t
SET t.person_id = '4'
where t.person_id  = '8';

But this gives oracle error 0001 unique constraint violated. Is there anyway to overcome this issue and do a by force update?
What I can see at the moment is droping the index and update and create index is the only solution?
Is there any alternative?

Thanks in advance,
/Garuka

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 19 2007
Added on Mar 22 2007
7 comments
1,627 views