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!

Cascade delete

689201Apr 16 2009 — edited Apr 16 2009
Hi,
I have 4 tables with one parent and 3 child.

like

X is parent table having a id -pk

A - is chiled table with delete cascade on X table ID
B -is chiled table with delete cascade on X table ID
C -is chiled table with delete cascade on X table ID

if i delete row in X table

delete from X where id =1 (parent)

DELETE CASCADE deletes all the rows in chiled having ID =1 in A,B,C tables

how to restrict explicitly in the above query to delete only from the specifc chield table. like

delete only from A table having ID =1 but not to delete any of the records in B and C table even thaough thy have ID=1 and have cascade delete on the parent.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 14 2009
Added on Apr 16 2009
4 comments
394 views