Home | Previous Page | Next Page  

Creating and Using Triggers

In This Chapter
When to Use Triggers
How to Create a Trigger
Assigning a Trigger Name
Specifying the Trigger Event
Defining the Triggered Actions
A Complete CREATE TRIGGER Statement
Using Triggered Actions
Using BEFORE and AFTER Triggered Actions
Using FOR EACH ROW Triggered Actions
Using the REFERENCING Clause
Using the WHEN Condition
Using SPL Routines as Triggered Actions
Passing Data to an SPL Routine
Using SPL
Updating Nontriggering Columns with Data from an SPL Routine
Triggers in a Table Hierarchy (IDS)
Using Select Triggers (IDS)
SELECT Statements That Execute Triggered Actions
Stand-Alone SELECT Statements
Collection Subqueries in the Select List of a SELECT Statement
SELECT Statements Embedded in User-Defined Routines
Views
Restrictions on Execution of Select Triggers
Select Triggers on Tables in a Table Hierarchy
Re-Entrant Triggers
INSTEAD OF Triggers on Views (IDS)
Using an INSTEAD OF Trigger to Update on a View
Tracing Triggered Actions
Example of TRACE Statements in an SPL Routine
Example of TRACE Output
Generating Error Messages
Applying a Fixed Error Message
Generating a Variable Error Message
Summary
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]