Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Can't drop Index on empty table - ORA-02429
On 7 Jan 2002 09:52:43 -0800, nickel10b_at_hotmail.com (N) wrote:
>I'm beginning work on an Oracle table that was created by someone
>else. The table has not been used yet, and has no data in it. It has
>a unique index on it which is a combination of 4 columns. I'd like to
>remove one of the four and replace it with a different column.
>
>I'm unable to alter the index, perhaps because of syntax issues. When
>I tried to drop the index to start over, I got this message:
>
>ORA-02429: cannot drop index used for enforcement of unique/primary
>key
>
>What can I do to get around this? Thanks.
alter table <table_name> drop primary key cascade;
or
alter table <table_name> drop constraint <constraint_name> cascade;
As the index enforces a constraint you need to drop the constraint not the index. Dropping the constraint will drop the index.
Hth
Sybrand Bakker, Senior Oracle DBA
To reply remove -verwijderdit from my e-mail address Received on Mon Jan 07 2002 - 12:40:16 CST