A DML (Data Manipulation Language) trigger is a special type of stored procedure that fires when an Insert, Update, or Delete operation is performed on a database table. DML triggers are used to implement business rules when data is altered and to extend the integrity checking logic of Microsoft SQL Server constraints, defaults, and rules. This lab is divided into eight exercises explaining different types of DML triggers and their usage. In first exercise we will learn to create AFTER INSERT trigger. In second exercise we learn to create AFTER UPDATE trigger. In third exercise we will learn to create AFTER DELETE trigger. In fourth exercise we will to create INSTEAD OF INSERT trigger. In fifth exercise we will to create INSTEAD OF UPDATE trigger. In sixth exercise we will to create INSTEAD OF DELETE trigger. Seventh exercise is Self-Assessment, where a problem is given and you need to that on you own. Eighth exercise presents the TSQL-challenge that needs to be solved (slightly tougher than self-assessment).

Subscribe to Download


Version1.0
Download4
File Size757.29 KB
Create DateSeptember 12, 2016
Last UpdatedSeptember 12, 2016
SQL Server DDLTriggers
SQL Server Statistics Internals