Microsoft® SQL Server 2008 R2 Unleashed
by Ray Rankins, Paul Bertucci, Chris Gallelli, Alex T. Silverstein
Using DML Triggers
DML triggers are invoked when a DML event occurs in the database. DML events manipulate or modify the data in a table or view. These events include insertions, updates, and deletions.
DML triggers are powerful objects for maintaining database integrity and consistency. They are able to evaluate data before it has been committed to the database. During this evaluation period, these triggers can perform a myriad of actions, including the following:
• Compare before and after versions of data.
• Roll back invalid modifications.
• Read from other tables, including those in other databases.
• Modify other tables, including those in other databases.
• Execute local and remote stored procedures.
Based on the nature of these actions, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access