Enforcing Business Rules with Triggers

A trigger is a special type of stored procedure that is automatically invoked whenever the data in the table is modified. Triggers are invoked in response to INSERT, UPDATE, or DELETE statements. A trigger can query other tables and can include complex Transact-SQL statements. The trigger and the statement that fires it are treated as a single transaction that can be rolled back from within the trigger. If a severe error is detected, the entire transaction automatically rolls back.

Triggers are useful in these ways:

See Also

Stored Procedures

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.