ERROR 位于第 1 行: ORA-02429: cannot drop index used for enforcement of unique/primary key
好,那就就先删了主键
SQL> select OWNER,CONSTRAINT_NAME,TABLE_NAME from user_constraints; OWNER CONSTRAINT_NAME TABLE_NAME ------------------------------------------------------------ ------------------------------------------------------------ ---- SCOTT PK_DEPT DEPT SCOTT PK_EMP EMP SCOTT FK_DEPTNO EMP
SQL> alter table dept drop constraints pk_dept;
又是错误
ERROR 位于第 1 行: ORA-02273: this unique/primary key is referenced by some foreign keys