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

Home -> Community -> Usenet -> c.d.o.misc -> Regarding Oracle Constraints and Indexes

Regarding Oracle Constraints and Indexes

From: rbhatraju <venkataramana.bhatraju_at_nospam.com>
Date: Wed, 02 Feb 2005 03:42:11 -0500
Message-ID: <9c7470563109f6c09c55bb24a18d77b0@localhost.talkaboutdatabases.com>


Actually I have created a new table with a not null column cust_id, followed by a unique index and then added a primary key on this column. It gave me a system generated name for the PK constraint. So to have a legitimate name, I dropped the primary key using SQL> ALTER table tablename drop primary key;"

SQL> select index_name, tablespace_name from dba_indexes where owner='XXX' and table_name='XXX';

no rows selected

When I searched for index it gave me no rows.

My question is dropping a primary key drops the index as well in oracle? This won't behave the same way in DB2 (even if the primary key gets dropped the unique index remains)

Thanks and regards in advance.
Venkat Received on Wed Feb 02 2005 - 02:42:11 CST

Original text of this message

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