Wednesday, June 16, 2021

What are triggers in sql server?

 A trigger is a special type of stored procedure that automatically run when an event occurs in the database server. 

Types of Triggers:-

There are three types of triggers in sql server.

  • DML Triggers
  • DDL Triggers
  • Logon Triggers
DML triggers run when a user tries to modify data through the Data Manipulation Language(DML) event. DML event are INSERT, DELETE or UPDATE statement on a table or view. These triggers fire when any valid event fires, whether table row affected or not.

DDL triggers run in response to a variety of Data Definition Language(DDL) events. DDL event are CREATE , ALTER or DROP Statements.

Logon triggers fires in response to the LOGON event that’s raised when session is being established. 
 



No comments:

Post a Comment

Featured Post

What is JavaScript? What is the role of JavaScript engine?

  The JavaScript is a Programming language that is used for converting static web pages to interactive and dynamic web pages. A JavaScript e...