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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: pros and cons

Re: pros and cons

From: ????? ???????? <v.gorbunov_at_protek.ru>
Date: Thu, 1 Apr 2004 13:51:45 +0400
Message-ID: <024701c417ce$f16f6dd0$29160090@protek>


8.1.7.4

SQL> create table t(n number);

Table created.

SQL> create unique index i on t(n);

Index created.

SQL> alter table t add primary key(n);

Table altered.

SQL> alter table t drop primary key;

Table altered.

SQL> select index_name from user_indexes where index_name ='I';

no rows selected

SQL>

> Hi!
>
> > In the case of a unique index, any time you diable the corresponding
> > constraint, the index will be dropped. (It has to be, else the column
> > would still have the unique property, due to the index.)
>
> By the way, whether the index is dropped or not upon PK/UK constraint
> disabling, is dependent on whether the index is system generated or not
(the
> generated column on dba_indexes). You can have an unique index used used
for
> a constraint, but it doesn't get dropped if the index is created manually
> (with create index before constraint creation or during constraint
creation
> using the "using index (create index... )" clause).
>
> Tanel.
>
>
> ----------------------------------------------------------------
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> ----------------------------------------------------------------
> To unsubscribe send email to: oracle-l-request_at_freelists.org
> put 'unsubscribe' in the subject line.
> --
> Archives are at http://www.freelists.org/archives/oracle-l/
> FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
> -----------------------------------------------------------------



Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Thu Apr 01 2004 - 03:49:35 CST

Original text of this message

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