Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Connection Constraint - Index
How can I find out which index is used for enforcing a unique or primary
constraint?
Consider the following:
drop table test cascade constraints;
create table test (
a number not null , b number not null , c number not null
create unique index test_bac on test (b, a, c);
create unique index test_cba on test (c, b, a);
create unique index test_abc on test (a, b, c);
alter table test add (
constraint test_pk primary key (a, b, c)
);
drop index test_abc;
drop index test_bac;
drop index test_cba;
Now guess which index gives you
ORA-02429: cannot drop index used for enforcement of unique/primary key
Martin Received on Fri Feb 18 2000 - 10:20:48 CST