9.11 Order in Which Triggers Fire
If two or more triggers with different timing points are defined for the same statement on the same table, then they fire in this order:
- 
                     All BEFORESTATEMENTtriggers
- 
                     All BEFOREEACHROWtriggers
- 
                     All AFTEREACHROWtriggers
- 
                     All AFTERSTATEMENTtriggers
If it is practical, replace the set of individual triggers with different timing points with a single compound trigger that explicitly codes the actions in the order you intend. For information about compound triggers, see "Compound DML Triggers".
If you are creating two or more triggers with the same timing point, and the order in which they fire is important, then you can control their firing order using the FOLLOWS and PRECEDES clauses (see "FOLLOWS | PRECEDES").
               
If multiple compound triggers are created on a table, then:
- 
                     All BEFORESTATEMENTsections run at theBEFORESTATEMENTtiming point,BEFOREEACHROWsections run at theBEFOREEACHROWtiming point, and so forth.If trigger execution order was specified using the FOLLOWSclause, then theFOLLOWSclause determines the order of execution of compound trigger sections. IfFOLLOWSis specified for some but not all triggers, then the order of execution of triggers is guaranteed only for those that are related using theFOLLOWSclause.
- 
                     All AFTERSTATEMENTsections run at theAFTERSTATEMENTtiming point,AFTEREACHROWsections run at theAFTEREACHROWtiming point, and so forth.If trigger execution order was specified using the PRECEDESclause, then thePRECEDESclause determines the order of execution of compound trigger sections. IfPRECEDESis specified for some but not all triggers, then the order of execution of triggers is guaranteed only for those that are related using thePRECEDESclause.Note: PRECEDESapplies only to reverse crossedition triggers, which are described in Oracle Database Development Guide.
The firing of compound triggers can be interleaved with the firing of simple triggers.
When one trigger causes another trigger to fire, the triggers are said to be cascading. The database allows up to 32 triggers to cascade simultaneously. To limit the number of trigger cascades, use the initialization parameter OPEN_CURSORS (described in Oracle Database Reference), because a cursor opens every time a trigger fires.