by Jason Brimhall

This chapter presents recipes for creating and using Data Manipulation Language (DML) and Data Definition Language (DDL) triggers. DML triggers respond to INSERT, UPDATE, and DELETE operations against tables and views. DDL triggers respond to server and database events such as CREATE TABLE and DROP TABLE statements.

Triggers, when used properly, can provide a convenient automatic response to specific actions. They are appropriate for situations in which you must create a business-level response to an action. However, they should not be used in place of constraints, such as primary key, foreign key, and check ...

Get SQL Server T-SQL Recipes, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.