Skip to Main Content

Oracle Database Discussions

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!

Constraint violation on a droped constraing

Marius2Apr 10 2008 — edited Apr 10 2008
My problem started when I tried to update a column with the same value as it already had. This is the navn column. Then I got a constraint violation. I tried to drop the constraint and as you can see under it is droped, but still I get the violation. Why? How do I get around this?

SQL> UPDATE vin.viner SET navn=TRIM('Brolo di Campofiorin'), pris=189, passer_til='LYST KJØTT STORFE SMÅVILT OG FUGL' , attr1
=8, attr2=7, attr3=7, type_id=1, beskrivelse='', varenummer=33217, lagring='Konsumferdig, MEN KAN FORTSATT OPPBEVARES', alkoh
ol=14, sukker=null, syre=null, produsent_id=361, distrikt_id=221, literpris=253;
UPDATE vin.viner SET navn=TRIM('Brolo di Campofiorin'), pris=189, passer_til='LYST KJØTT STORFE SMÅVILT OG FUGL' , attr1=8, a
ttr2=7, attr3=7, type_id=1, beskrivelse='', varenummer=33217, lagring='Konsumferdig, MEN KAN FORTSATT OPPBEVARES', alkohol=14
, sukker=null, syre=null, produsent_id=361, distrikt_id=221, literpris=253
*
ERROR at line 1:
ORA-00001: unique constraint (VIN.VINER_UK_NAVN) violated


SQL> alter table vin.viner disable constraint viner_uk_navn;
alter table vin.viner disable constraint viner_uk_navn
*
ERROR at line 1:
ORA-02431: cannot disable constraint (VINER_UK_NAVN) - no such constraint


SQL> alter table vin.viner drop constraint viner_uk_navn;
alter table vin.viner drop constraint viner_uk_navn
*
ERROR at line 1:
ORA-02443: Cannot drop constraint - nonexistent constraint

--- edit
I just noticed that I get constraint violation even if I use a value that I'm certain that isn't used.

----

Message was edited by:
Marius
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 8 2008
Added on Apr 10 2008
4 comments
2,172 views