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!

Adding a UNIQUE Constraint to an existing table

user9359353Jun 8 2011 — edited Jun 8 2011
Hi,

I got this issue because of the existing data. My issue is in my table I want to add a unique constraint to two columns but i cannot add this becuase of the existing repeating data. And I cannot do a data repair to fix the repeating data since the customer is reling on this data so we can not get the decision to repair the data.

As a solution I try this method, by adding a function to check the repeating data before inserting the data to the table. It's working fine to a user but when it come to multiple users it's not working because users can log to the database and can do their transactions simultaneously.

My question is; is there a way in oracle to add a constraint to the data that can add in future not to the old existing data?

Thanks,
Darex.
This post has been answered by ali on Jun 8 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 6 2011
Added on Jun 8 2011
4 comments
1,041 views