by Chris Gallelli
IN THIS CHAPTER
Benefits and Uses of Triggers
Creating Triggers
AFTER Triggers
inserted and deleted Tables
Checking for Column Updates
Nested Triggers
Recursive Triggers
Enforcing Referential Integrity with Triggers
INSTEAD OF Triggers
A trigger is a special type of stored procedure that is executed automatically as part of a data modification. A trigger is created on a table and associated with one or more actions linked with a data modification (INSERT, UPDATE, or DELETE). When one of the actions for which the trigger is defined occurs, the trigger fires automatically. The trigger executes within the same transaction space as the data modification statement, so the trigger becomes a part of it.