Learn the purpose and how to resolve the ORA-02260 error message in Oracle.
Description
When you come across an ORA-02260 error, the following error message will appear:
ORA-02260: table can have only one primary key
Cause
You tried to create a major key for a desk that already has a main key.
Resolution
The option(s) to resolve this Oracle error are:
Option #1
You can drop the existing major key for the desk and create a new essential key.
For example, to drop the most important key named supplier_pk from the supplier table, you could execute the following command:
ALTER TABLE supplier
DROP CONSTRAINT supplier_pk;
Then re-create your primary key.
Leave a Review