Hi Team,
I am getting below error while enabling the constraint(ALTER TABLE child ENABLE CONSTRAINT fk_sup) in the child table.
SQL Error: ORA-02298: cannot validate - parent keys not found
02298. 00000 - "cannot validate (%s.%s) - parent keys not found"
*Cause: an alter table validating constraint failed because the table has
child records.
*Action: Obvious
I checked the parent and child table.
The common value(Reference kay value) is available in both table.
There is no data in the below query result.
SELECT
*
FROM
inv.child c
WHERE
NOT EXISTS (
SELECT
1
FROM
inv.parent p
WHERE
p.mk_id = c.mk_id
);
I am using Oracle 12c Database.
How to resolve this issue.
Thank in Advance.
Best Regards,
Abu