Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Disabling Existing Constraints and Index dropped
Hi,
If I disable an existing constraints (primary key), it seems the index would
be dropped too.
How about I enable the primary key constraints again, will it create the
index or I have to create the index by myself?
Thanks for your help.
Phil
Examples:
SQL> DROP INDEX SCOTT.PK_EMP;
DROP INDEX SCOTT.PK_EMP
*
ERROR at line 1:
ORA-02429: cannot drop index used for enforcement of unique/primary key
SQL> ALTER TABLE SCOTT.EMP DISABLE PRIMARY KEY; Table altered.
SQL> DROP INDEX SCOTT.PK_EMP;
DROP INDEX SCOTT.PK_EMP
*
ERROR at line 1:
ORA-01418: specified index does not exist
SQL> ALTER TABLE SCOTT.EMP ENABLE PRIMARY KEY; Table altered.
SQL> Received on Mon Aug 05 2002 - 13:09:09 CDT