Cascade delete
689201Apr 16 2009 — edited Apr 16 2009Hi,
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.