I am a software developer at MindStick soft. Pvt. ltd. I joined this company in august 2021 after completing my post-graduation course. I love to see the historical places of my country.
Data Manipulation Language (DML) triggers are fired in response to events caused by DML statements like
INSERT, UPDATE, and DELETE. They can also be triggered by system-defined stored procedures that perform operations similar to DML statements. These triggers can be used to ensure data integrity and also to query other tables.
There are two types of DML triggers:
a. AFTER Trigger It is fired when the SQL server action that triggered it is completed. It is typically executed whenever an INSERT, UPDATE, or DELETE operation on a table is completed.
Example:
b. INSTEAD OF Trigger
It is fired before the SQL server begins executing the action that triggers it. Hence, the trigger will fire even if the constraint check fails.
Example:
Join MindStick Community
You need to log in or register to vote on answers or questions.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
Data Manipulation Language (DML) triggers are fired in response to events caused by DML statements like INSERT, UPDATE, and DELETE. They can also be triggered by system-defined stored procedures that perform operations similar to DML statements. These triggers can be used to ensure data integrity and also to query other tables.
There are two types of DML triggers:
a. AFTER Trigger
It is fired when the SQL server action that triggered it is completed. It is typically executed whenever an INSERT, UPDATE, or DELETE operation on a table is completed.
Example:
b. INSTEAD OF Trigger
It is fired before the SQL server begins executing the action that triggers it. Hence, the trigger will fire even if the constraint check fails.
Example: