Site icon IT Tutorial

ORA-02264: name already used by an existing constraint

I got ” ORA-02264: name already used by an existing constraint  ”  error in Oracle database.

 

ORA-02264: name already used by an existing constraint

 

Details of error are as follows.

ORA-02264: Name already used by an existing constraint

Cause: The specified constraint name has to be unique.

Action: Specify a unique constraint name for the constraint.

 

 

 

Name already used by an existing constraint

This ORA-02264 error is related with the specified constraint name has to be unique.

To solve this error, Specify a unique constraint name for the constraint.

 

Check this constraint name if it exist or not.

select * from dba_constraints where constraint_name = upper ('CONTRAINT_NAME');

 

If it exists, then you should specify a unique constraint name for the constraint.

Or you can drop the existing constraint as follows. Then try again.

SQL> alter table TABLE_NAME drop constraint CONTRAINT_NAME;
Table altered

 

 

 

Do you want to learn Oracle Database for Beginners, then read the following articles.

Oracle Tutorial | Oracle Database Tutorials for Beginners ( Junior Oracle DBA )

 

Exit mobile version