A Simple Tutorial for DML Triggers


Introduction

The trigger is a method provided by SQL Server to programmers and data analysts to ensure data integrity. It is a special stored procedure related to table events. Its execution is not called by the program or started manually but triggered by events. For example, when a table is operated on with an INSERT, DELETE, or UPDATE, the trigger will be fired for execution. Triggers are often used to strengthen data integrity constraints and business rules. SQL Server includes three general types of triggers: DML trigger, DDL trigger, and logon trigger. This article focuses on DML triggers.

DML triggers