Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-02291 Error on delete with cascade

skahlertJul 7 2010 — edited Aug 23 2010
Hello guys! I have a mastertable called TBL_VEG_MAINDATA (PK cnt_veg_maindata) and a subtable TBL_VEG_SUBDATA, which references the parent pk column using a foreign key. The foreign key is set to cascade on delete. Hence when I delete a parent entry, all related datsets in my subtable should be automatically deleted as well. Nevertheless, whenever I delete a parent record from TBL_VEG_MAINDATA, I stumble upon an integrity constraint (parent key not found).
In fact I expect the rdbms to automatically forward the delete request to the subtable when the parent dataset is deleted.

Do you have an idea what I am doing wrong?

A million thanks in advance!

Brgds,

Seb
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 20 2010
Added on Jul 7 2010
6 comments
1,686 views