Chapter 8. Triggers

Triggers are routines that fire automatically as a result of an event in the database server. Microsoft SQL Server supports data-manipulation language (DML) and data-definition language (DDL) triggers, which can be developed either with T-SQL or with .NET code and can fire AFTER or INSTEAD OF the triggering event. In this chapter, I’ll describe in detail the different types of triggers, first describing DML AFTER triggers and later, in a dedicated section, DDL AFTER triggers. I’ll also focus on AFTER triggers that you write with T-SQL, and in a dedicated section, I’ll describe triggers that you develop with .NET code (CLR triggers).

Triggers are ...

Get Inside Microsoft® SQL Server™ 2005 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.