Re: index doesn't contain duplicates
From: Nigel Thomas <nigel.cl.thomas_at_googlemail.com>
Date: Tue, 9 Jun 2009 20:50:01 +0100
Message-ID: <53258cd50906091250s45903245s9b86389d7c4e5897_at_mail.gmail.com>
Just for fun, I tried to duplicate this in Oracle XE 10.2.0.1 and couldn't. OTOH, I only tried inserting 4 rows.
NONUNIQUE SQL> insert into testnonunique values ('DD'); insert into testnonunique values ('DD')
*
ERROR at line 1:
ORA-00001: unique constraint (TESTUSER.TNU_PK) violated
Date: Tue, 9 Jun 2009 20:50:01 +0100
Message-ID: <53258cd50906091250s45903245s9b86389d7c4e5897_at_mail.gmail.com>
Just for fun, I tried to duplicate this in Oracle XE 10.2.0.1 and couldn't. OTOH, I only tried inserting 4 rows.
When I inserted the duplicate row, I got (as you would expect):
SQL> select uniqueness from user_indexes where index_name='TNU1' 2 /
UNIQUENES
NONUNIQUE SQL> insert into testnonunique values ('DD'); insert into testnonunique values ('DD')
*
ERROR at line 1:
ORA-00001: unique constraint (TESTUSER.TNU_PK) violated
(TNU_PK was created based on non-unique index TNU1)
Thinking on from Mark Powell's suggestions - how was the CTAS done?
Cheers Nigel
-- http://www.freelists.org/webpage/oracle-lReceived on Tue Jun 09 2009 - 14:50:01 CDT