What is trigger?
In database, trigger is a stored procedure that may be configured to automatically execute when certain events take place. Triggers can restrict access to specific data, perform logging, or audit data modifications. Each trigger is associated with a single table and is set to fire when records are inserted into, updated in, or deleted from that table. Triggers offer database developers and administrators a tremendous degree of flexibility. They are, quite simply, stored procedures that may be configured to automatically execute when certain events take place.
The basic command which is used to create a new trigger is the CREATE TRIGGER statement. This statement is followed by the details of when the trigger should fire. Triggers may be associated with INSERT, UPDATE and DELETE events and may be used either INSTEAD OF or AFTER the specified operation. Once you've specified the trigger criteria, you supply the SQL statement that contains the trigger's payload.
There are two classes of triggers: "row triggers" or "statement triggers". Row triggers define an action for every row of a table, while statement triggers occur only once per INSERT, UPDATE, or DELETE statement. Triggers cannot be used to audit data retrieval via SELECT statements.
SQL trigger Syntax:

Tags: triggers SQL Server stored procedure row triggers statement triggers
Readers also visit these:
Which license is best for me?What is date type?
What is T-SQL (Transact-SQL)?
How to compare and synchronize the differences of two database triggers?
What is stored procedure?
Related Questions:
What is T-SQL (Transact-SQL)?What is stored procedure?
What is alarm manager (database)?
How to compare and synchronize the stored procedures of two databases?
Technical Support
Latest News
- Can you show me the ...
- How to compare and s...
- How to compare and s...
- How to compare and s...
- How to compare and s...
- Which license is bes...
Awards
Customer Service |
| If you have any question or suggestion,please contact us. |
| Get Help>> |
:
: 

