[oracle@localhost ~]$ oerr ora 2429
02429, 00000, "cannot drop index used for enforcement of unique/primary key"
// *Cause: user attempted to drop an index that is being used as the
// enforcement mechanism for unique or primary key.
02429, 00000, "cannot drop index used for enforcement of unique/primary key"
// *Cause: user attempted to drop an index that is being used as the
// enforcement mechanism for unique or primary key.
// *Action: drop the constraint instead of the index.
很明显,它具有索引和约束名的意义;也就是:
采用alter table tb1 add constraint unique(object_id);
而不是:create unique index on tb1(object_id);
解决办法:
// *Action: drop the constraint instead of the index.
如果不知道查询sql references =>搜索drop constraint
:alter table tb1 drop unique(object_id);
SQL> alter table ca1 drop unique(object_id);
Table altered.
所以大家要知道个概念:
create unique index只建立索引在dba_straints里面是查询不到U的约束类型
而alter table .....unique(column_name);是具备索引和约束名;