Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Strange error with Oracle 10g XE

Strange error with Oracle 10g XE

From: Jens Lenge <spampot_at_gmx.net>
Date: 27 Sep 2006 13:39:16 -0700
Message-ID: <1159389556.630216.282100@d34g2000cwd.googlegroups.com>


Hello world,

The following SQL statements run successfully on Oracle 9i, but fail on Oracle 10g XE.

(The idea is to 1. drop the old primary key, 2. perform some changes that would otherwise violate the old pk constraint, 3. add a new primary key constraint that is different from the old one.)

alter table myTable drop constraint pk130 /* old primary key */;

insert into myTable (myColumn1, myColumn2, myColumn3)   select myColumn1, 1, myColumn3 from myTable ;

...

With Oracle XE, the first statement does not yield any error, and if I check with Oracle SQL Developer, the constraint seems to be actually deleted.
But in spite of that, the second statement returns error ORA-00001 and claims that unique constraint pk130 is violated (although it should have been successfully dropped before).

While the same SQL statements still work with Oracle 9i, I have no clue why the above error occurs with Oracle 10g XE. I would appreciate if you could try to reproduce this behavior and help me understand it in order to find a solution that works for 9i, 10g, and 10g XE.

Jens Received on Wed Sep 27 2006 - 15:39:16 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US