What Are Triggers in MS SQL Server?
Submitted by: AdministratorA trigger is a special kind of stored procedure that automatically executes when an event occurs in the database server. A trigger is really an event handler. SQL Server allows users to create triggers (event handlers) for 3 types of events:
* DML Event - Occurs when a DML (Data Manipulation Language) statement: INSERT, UPDATE or DELETE, is executed.
* DDL Event - Occurs when a DDL (Data Definition Language) statement: CREATE, ALTER, or DROP, is executed.
* Logon Event - Occurs when a user logins to the Server.
There are 3 different types of triggers (event handlers) based on the types of events they are triggered by:
* DML Trigger - Executes in response to a DML event.
* DDL Trigger - Executes in response to a DDL event.
* Logon Trigger - Executes in response to a logon event.
Submitted by: Administrator
* DML Event - Occurs when a DML (Data Manipulation Language) statement: INSERT, UPDATE or DELETE, is executed.
* DDL Event - Occurs when a DDL (Data Definition Language) statement: CREATE, ALTER, or DROP, is executed.
* Logon Event - Occurs when a user logins to the Server.
There are 3 different types of triggers (event handlers) based on the types of events they are triggered by:
* DML Trigger - Executes in response to a DML event.
* DDL Trigger - Executes in response to a DDL event.
* Logon Trigger - Executes in response to a logon event.
Submitted by: Administrator
Read Online MS SQL Server Job Interview Questions And Answers
Top MS SQL Server Questions
☺ | How To Create a Testing Table with Test Data in MS SQL Server? |
☺ | What Happens If Strings Are Casted into Wrong Code Pages in MS SQL Server? |
☺ | How To Create a View on an Existing Table in MS SQL Server? |
☺ | How To Use Subqueries with the EXISTS Operators in MS SQL Server? |
☺ | PHP MSSQL - How To Display a Past Time in Days, Hours and Minutes? |
Top Databases Programming Categories
☺ | RDBMS Interview Questions. |
☺ | SQL Interview Questions. |
☺ | SSRS Interview Questions. |
☺ | Database Administrator (DBA) Interview Questions. |
☺ | Sybase Interview Questions. |