What is Triggers and why we use triggers
What is Triggers and why we use triggers
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
MuthuMari MPosted Apr 9, 2012, 3:13 AM
A trigger is a special type of stored procedure that is not called directly by a user. When the trigger is created, it is defined to execute when a specific type of data modification(insert,update,delete) is made against a specific table or column.
1.When we want to insert data into multiple tables at same time.
2. when we want to write some constraints.
3. for security purpose we also use triggers
thanks
If this post is useful then mark it as "Accepted Answer"
SenthilkumarPosted Apr 9, 2012, 8:23 AM
Jignesh TrivediPosted Apr 9, 2012, 4:02 AM
A trigger is a special kind of stored procedure that automatically executes when an event occurs in the database server. DML triggers execute when a user tries to modify data through a data manipulation language (DML) event. DML events are INSERT, UPDATE, or DELETE statements on a table or view. These triggers fire when any valid event is fired.
As per my knowledge Trigger is only when you do some ad-hoc SQl task.
I always preferred, do not use when it really not required.
hope this help.