The readers of my articles on several forums asks questions regarding something or the other and I do answer them promptly. However I feel the answers should be shared among a larger group of people. I think this blog will make this possible.
Showing posts with label DDL. Show all posts
Showing posts with label DDL. Show all posts
Thursday, January 9, 2020
Thursday, June 26, 2014
What is a trigger in SQL Server?
A trigger is an event or an action that precipitates other events. However a trigger in SQL Server is a special kind of stored procedure that automatically executes when an event occurs in the database server.
If you want to know what is a stored procedure, follow this link:
http://hodentekhelp.blogspot.com/2011/06/what-is-stored-procedure.html
If you want to know what is a stored procedure, follow this link:
http://hodentekhelp.blogspot.com/2011/06/what-is-stored-procedure.html
There are different kinds of events that can occur in a database server such as the following:
- Data Manipulation language events such as,
Insert
Update
Delete
statements on a Table or View.
In these cases if a trigger is defined, it will fire (respond to the event) regardless of any changes are made to the rows of a table.
- Data Definition Language events such as,
Create
Alter
Drop
and certain stored procedures that perform DDL-like operations
- Log-on trigger
These fire when a session is established by a user.
Labels:
All On all,
alter,
Create,
Database trigger,
DDL,
Delete,
DML,
drop,
insert,
log-on,
stored procedure,
update
Subscribe to:
Posts (Atom)
