Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Delete trigger order of execution with on_delete_cascade
Hi,
I am trying to establish the order of execution of delete triggers when on-delete-cascade is set on my foreign key.
If I have three tables T1, T2 and T3, all of which have before and after delete triggers defined, how will the be executed when I delete a row from T1 with the delete cascade? Are they nested thus:
T1_BEFORE_DELETE fires
T2_BEFORE_DELETE fires
T3_BEFORE_DELETE fires
T3_AFTER_DELETE fires
T2_AFTER_DELETE fires
T1_AFTER_DELETE fires
or are they done in a more linear fashion? like:
T1_BEFORE_DELETE fires
T1_AFTER_DELETE fires
then
T2_BEFORE_DELETE fires
T2_AFTER_DELETE fires
then
T3_BEFORE_DELETE fires
T3_AFTER_DELETE fires
Or is it done in some other non-deterministic way???
Any help much appreciated.
Thanks
Mark
Received on Fri Mar 24 2006 - 08:36:34 CST