ORA-00001 unique constraint & ORA-02443 Cannot drop constraint - nonexistent constraint
Issue
Dropped Primary key constraint BSNL_FIBER_TIP_USED_ORDER_PK using TOAD GUI
But while inserting a row in the table even after the constraint is dropped the following error thrown
Solution
1. First tried to drop the constraint using SQL Command promt.
ALTER TABLE BSNL_FIBER_TIP_USED_ORDER DROP CONSTRAINT BSNL_FIBER_TIP_USED_ORDER_PK;
ORA-06502: PL/SQL: numeric or value error
ORA-06512: at line 10
ORA-02443: Cannot drop constraint - nonexistent constraint
2. Checked DBA_CONSTRAINTS
3. Then checked the DBA_INDEXES because when a primary key constraint is added to any table it automatically creates one unique index with the same name as the primary key constraint name
OR directly check with index name
SELECT * FROM DBA_INDEXES
WHERE INDEX_NAME='BSNL_FIBER_TIP_USED_ORDER_PK';
4. Then dropped the index
5. Now able to insert a row.