Home / Oracle Errors / ORA-02291

ORA-02291

Integrity constraint violated - parent key not found

What it means

You tried to insert or update a child row whose parent row does not exist.

Common causes

How to fix it

  1. Find the constraint: SELECT table_name,r_constraint_name FROM dba_constraints WHERE constraint_name='<NAME>';
  2. Insert the parent row first
  3. Load tables in parent-to-child order

How to prevent it

Load in dependency order and keep reference data complete.

Still stuck? Ask the community in Q&A.

Get the weekly Vismo digestNew Oracle articles and Q&A in your inbox. No spam.

One email a week. Unsubscribe any time.