Error code

Oracle ORA-02291

ORACLEORA-02291
Database Error Code· An error code returned by a database server such as PostgreSQL or MySQL.

What it means

integrity constraint violated — parent key not found.

How to fix it

  1. Insert the parent row before inserting the child row.
  2. Verify the foreign key value is correct and the parent table contains the expected row.
  3. Wrap parent and child inserts in a transaction to ensure atomicity.

Not affiliated with Oracle. Answer summarized from the manufacturer's manual linked above; consult that source for the authoritative procedure.