Triggers:
This chapter displays how to enforce complex constraints using the concept known as Triggers. The trigger involves PL/SQL statements which get automatically invoked whenever any DML operations are performed on a table.
- Understanding Triggers
- Types of Triggers
- Designing Triggers
- Writing Trigger body
- Using INSTEAD OF triggers
- Enabling and Disabling triggers
A database trigger is a stored PL/SQL block which is related with a table. The Triggers are automatically executed when a specified SQL statement is issued against the table. Triggers are commonly used for the subsequent purposes:
- To automatically produce values
- To give auditing.
- To give invalid transactions.
- To look for complex integrity constraints that cannot be provided in Constraints
- To maintain replicate tables.
Triggers hold PL/SQL constructs and they can be fired only for DML Statements such as INSERT, UPDATE and DELETE. A Trigger is event based.