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

Home -> Community -> Usenet -> c.d.o.server -> Re: Connection Constraint - Index

Re: Connection Constraint - Index

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Fri, 18 Feb 2000 18:55:43 +0100
Message-ID: <950900403.12527.1.pluto.d4ee154e@news.demon.nl>


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

Original text of this message

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