Re: Sequence of Triggers

From: deejay <djuravel_at_dgny.com>
Date: 4 Dec 2001 13:55:21 -0800
Message-ID: <f7b19882.0112041355.b3d5a0d_at_posting.google.com>


djuravel_at_dgny.com (deejay) wrote in message news:<f7b19882.0112040622.53076da0_at_posting.google.com>...
> I've learnt from previous deja discusssions that one way to get around
> the "Table Mutating...Any changes made made be lost" problem is to
> make 2 triggers. One being the row trigger which saves the new data of
> a specific row, and the other being the statement trigger which
> actually executes the updates for each row based the the saved values.
> One thing I'm not clear on: When updating a table with these 2
> triggers, what is the sequence of the firing of these triggers? Is the
> row trigger fired and then the statement trigger immediately fired
> after that row trigger was fired --for each row, or does the row
> trigger get fired for each row and then at the end, just once the
> statement trigger gets fired?

At first fires the row trigger for each row, then fires the after statement trigger (at the end).

If you insert/update/delete 2 rows, the row trigger fires for 1st row, then the row trigger fires for 2nd row and in the end the after statement trigger fires.

cu,
Andreas

This response was submitted BY Andreas Ballenthin Received on Tue Dec 04 2001 - 22:55:21 CET

Original text of this message