O'Reilly logo

Microsoft® SQL Server™ 2000 Programming by Example by Carlos Eduardo Rojas, Fernando G. Guerrero

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Types of Triggers According to Their Order

SQL Server 2000 defines two different types of triggers:

  • INSTEAD OF triggers that fire instead of the original action, before the base object is modified

  • AFTER triggers that fire after the base table is modified

A table can have any number of AFTER triggers for every action, but only one INSTEAD OF trigger per action.

A view can have only INSTEAD OF triggers.

INSTEAD OFTriggers

INSTEAD OF triggers are fired automatically when you execute a statement by which the trigger is defined. In this case, the trigger fires before the action is executed. However, inside an INSTEAD OF trigger, you have access to the Inserted and Deleted virtual tables.

When the INSTEAD OF trigger starts its execution, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required