This module covers a tool that designers sometimes overlook when creating a database system: the database trigger.
The database trigger can add functionality to the database that might otherwise need to be handled by specialized coding.
By the end of this module, you will know how to:
Distinguish between a trigger and a procedure
Describe the syntax and use of special record variables
Create an insert, update, or delete trigger
Build and execute a trigger that covers insert, update, and delete
You will get lots of practice coding PL/SQL in this module.
The next lesson defines the trigger.
A trigger is a named PL/SQL unit that is stored in the database and run in response to an event that occurs in the database. You can specify the event, whether the trigger
fires before or after the event, and whether the trigger runs for each event or for each row affected by the event. For example, you can create a trigger that runs every time
an INSERT statement affects the EMPLOYEES table.