You can use triggers to do the following:
- Make sure the UPDATE, INSERT, MERGE, and DELETE statements performed on the subject table are propagated to another table.
- Auditing.
For example, you can define a trigger that causes the INSERT statements in a log table when an employee receives a raise higher than 10%.
- Disallow massive UPDATE, INSERT, MERGE, or DELETE during business hours.
- Set a threshold.
For example, you can set thresholds for inventory of each item by store, to create a purchase order when the inventory drops below a threshold, or to change a price if the daily volume does not meet expectations.
- Call SQL stored procedures and external stored procedures.