Trigger Lab
Trigger Lab
Introduction
Triggers in SQL Server 2012 are a special kind of stored procedure that fires automatically; they are
invoked or executed when an event occurs in the database server. We can create Data Manipulation
Language (DML) triggers and Data Definition Language (DDL) triggers in SQL Server 2012.
When the user wants to modify data using a DML event then the DML trigger is executed. In other words,
a DML trigger is used for INSERT, DELETE and UPDATE statements of a table or view.
When the user attempts to perform an operation using DDL then the DDL trigger is executed. In other
words, a DDL trigger is executed for CREATE, ALTER and DROP statements of a table or view.