Triggers Defined

A trigger is an action or set of actions that should be carried out if another action or event occurs. SQL Server triggers act a lot like triggers you experience in everyday life. For example, when the alarm clock goes off, it triggers the action of waking up. When the microwave bell sounds, you are triggered to open the door and pull out the hot food. When the dryer buzzer sounds, you are triggered to check the clothes in the electric dryer and see if they are ready to be removed. Database triggers work in exactly the same way. Triggers can respond to the firing event automatically or simply notify an administrator that the firing event has occurred.

For example, if you want to validate every update statement that is executed ...

Get SQL Server® 2008 Administration: Real World Skills for MCITP Certification and Beyond 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.