ORA-02443: Cannot drop constraint – nonexistent constraint

ORA-02443: Cannot drop constraint – nonexistent constraint

Oracle PL/SQL error message: ORA-02443: Cannot drop constraint – nonexistent constraint.

Cause:

An attempt was made to drop a constraint that does not exist.

Solution:

Check if the constraint and table name are correct and try to run the drop command again.

Example:

ALTER TABLE test 
DROP CONSTRAINT constr_name;

Output:

ORA-02443: Cannot drop constraint – nonexistent constraint

Check constraint

SELECT OWNER, CONSTRAINT_NAME, STATUS
FROM user_constraints
WHERE table_name = 'TEST';

Output:

OWNER CONSTRAINT_NAME STATUS
SYSTEM PK_TEST_ID ENABLED

Correct:

ALTER TABLE test 
DROP CONSTRAINT PK_TEST_ID;