enable constraint [message #328929] |
Mon, 23 June 2008 07:30 |
mandygrewalindia
Messages: 14 Registered: February 2008 Location: india
|
Junior Member |
|
|
hi I have unique key constraint on deptno of dept table which is disabled to insert duplicate values.
I need to enable constrain through enable novalidate n then make exceptions table ... however status in dba_constaints shows unique constraint disabled but wen i try to fire this command:
alter table scott.dept enable novalidate constraint unique_dept;
it shows error ORA-02299 i.e deplicate keys found....
please help...
|
|
|
Re: enable constraint [message #328931 is a reply to message #328929] |
Mon, 23 June 2008 07:47 |
msriram123
Messages: 11 Registered: May 2008 Location: Hyderabad
|
Junior Member |
|
|
Looks like multiple rows with the same deptno were inserted into your table while the constraint was disabled.
Before you enable the unique constraint, you need to somehow make sure that no deptno ever repeats in the table.
|
|
|
|
|
|