Responding To Data Manipulation Via Triggers
Responding To Data Manipulation Via Triggers
Responding To Data Manipulation Via Triggers
• Constraints:
• Are preferred to triggers
• Avoid data modification overhead on violation
• Triggers:
• Are complex to debug
• Use a rowversion store in tempdb database
• Excessive usage can impact tempdb performance
• Can increase the duration of transactions
INSTEAD OF Triggers
Demonstration: Working with INSTEAD OF Triggers
How Nested Triggers Work
Considerations for Recursive Triggers
UPDATE Function
Firing Order for Triggers
Alternatives to Triggers
• Demonstration: Replacing Triggers with Computed
Columns
INSTEAD OF Triggers
Logon Information
Virtual Machine: 20762C-MIA-SQL
User name: ADVENTUREWORKS\Student
Password: Pa55w.rd
Supporting Documentation
The Production.ProductAudit table is used to hold
changes to high value products. The data to be
inserted in each column is shown in the following
table:
Review Question(s)
• Best Practice