?>
Trigger Firing Sequence(Oracle PL/SQL Parameters)
RelationalDBDesign
SiteMap
PL/SQL
Stored Objects
PL/SQL Programming
Creating Triggers
«Prev
PL/SQL Objects
User Defined Functions
Correct Syntax Function
Syntax of Function
Stored Function
Function Returning Value
Returning Boolean Value
Function Syntax Returning Boolean
PL/SQL Blocks Conclusion
Create Function
Create Procedure
Oracle Function Procedure
Procedure Percentage Average
Procedures Calling Functions
Adding Procedure Function
Functions Procedures C onclusion
Create Trigger
What is a trigger?
Trigger Procedure Distinction
Special Trigger Variables
Combination Insert, Update, Delete
Database Triggers Conclusion
Using Parameters
PL/SQL Parameter Uses
Sending Parameters SQL*Plus
PL/SQL Parameter Usage
Parameter Procedure Placement
Return Command Function
PL/SQL Cursor Parameters
SQL*Plus Conclusion
Create Oracle Package
What is a Package?
How Packages are Used
Making Package Specification
Making Package Body
Executing Package Components
Package Conclusion
Controlling Transactions
Trigger Firing Sequence in Oracle
Just like a gun, firing a trigger requires that you first create the trigger, load it into the database, and define the target. (the event that causes it to be fired). In the example shown here, a user has created three rows that are to be inserted into a table in the database. The application sends the three rows as a set(transaction) to the database for processing. The system designer has created four triggers which fire when data is inserted into the table.
Looking at the activity inside the database, the system begins by inserting the first of three rows [ARS] into the table. The action fires two triggers: one trigger before any insert transaction, then one trigger before inserting the first row. Then the row is actually inserted into one table. Finally, a third trigger is fired after inserting the row.
The second row is sent to be inserted. This fires one trigger before and one trigger after inserting the row.
The third and final row fires one trigger before the row is inserted . Then the row is inserted and two triggers are fired. 1) One after the row is inserted and one that only fires after the full set of rows has been inserted. 2) The same sequence of events can be implemented for updates and deletes of rows as well.