Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Delete trigger order of execution with on_delete_cascade

Delete trigger order of execution with on_delete_cascade

From: <mark.catchpole_at_btinternet.com>
Date: 24 Mar 2006 06:36:34 -0800
Message-ID: <1143210994.634341.209680@j33g2000cwa.googlegroups.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US