Parts of a Trigger:
Trigger holds 3 parts. They are as given below:
- Triggering event or statement
- Trigger Restriction
- Trigger Action
Triggering event or Statement
It is a SQL statement which causes the trigger to be fired. The valid DML statements are - Insert, Update or Delete. In additional, trigger can be made to be fired when a particular column is updated. Moreover it can hold multiple DML statements.
Triggering Restriction
This is a Boolean expression that must be TRUE for the trigger to be fired.
Trigger Action
When a triggering statement is issued and also the triggering restriction is true this is a procedure holding SQL and PL/SQL statements to be executed.