Common Use Cases of PL/SQL Triggers
- To automate the actions in response to the events and reducing manual task.
- To apply constraint to ensure referential integrity and to prevent invalid data in table or database.
- In error handling to response to errors.
PL/SQL Triggers
PL/SQL stands for Procedural Language/ Structured Query Language. It has block structure programming features.PL/SQL supports SQL queries. It also supports the declaration of the variables, control statements, Functions, Records, Cursor, Procedure, and Triggers.PL/SQL contains a declaration section, execution section, and exception-handling section. Declare and exception handling sections are optional.
Syntax:
Declaration section
BEGIN
Execution section
EXCEPTION
Exception section
END;