Chapter 29. Creating and Managing Triggers

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.



    Part III: SQL Server Administration
    Part IV: Transact-SQL
    Part V: SQL Server Internals and Performance Tuning
    Part VI: Additional SQL Server Features