Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Connection Constraint - Index
Is Thomas Kyte allowed to enter this competition?
My guess would be test_abc (same column list).
Hth,
Sybrand Bakker, Oracle DBA
Martin Haltmayer <Martin.Haltmayer_at_0800-einwahl.de> wrote in message
news:38AD7160.E8BB7605_at_0800-einwahl.de...
> 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 - 11:55:43 CST