Skip to Main Content

Oracle Database Express Edition (XE)

Announcement

For appeals, questions and feedback, please email oracle-forums_moderators_us@oracle.com

Error in adding foreign key

Jana SawalhiDec 21 2023

alter table job_history add foreign key (JOB_ID) references jobs(JOB_ID);
alter table job_history add foreign key (JOB_ID) references jobs(JOB_ID)
*
ERROR at line 1:
ORA-02298: cannot validate (JANA1.SYS_C007240) - parent keys not found

why it keeps giving me this error, I checked that the JOB_ID is the primary key in jobs, also I checked that all the rows have data in JOB_ID

Comments
Post Details
Added on Dec 21 2023
2 comments
32 views