ORA-00001: unique constraint (myschema.UK_mytable) violated
ORA-06512: at "myschema.mytable", line 4210
UK_mytable is a unique key on the following fields of mytable.
There is no duplicate on this column combination col1 through col4 in table mytable.
However, duplicate exists in only col2 data.
col1 col2 col3 col4
abc 5K390440 def ICCOGCF2
uvw 5K390440 xyz FO785L63
The error is during an update:
update mytable u
set u.col2 = :new.v_col2
where u.col2 = :old.col2; -->old.col2 is 8K390640.
should this situation cause ORA-00001 error.
It seems mytable is unique only when all 4 columns are present.
Updating mytable with only one column col2 can raise unique constraint issues, is it true