Can you use a commit statement within a database trigger?

Answer

Come to think of it, I have never seen a commit on triggers. Triggers as you know are a last line defense based on an action that was carried out by an insert,update or delete. Hence, since the trigger exists on the server, and is only fired if one of the above conditions are executed then it seems pointless to use a commit in the trigger. Also commit goes along nicely with transactions where you begin the transaction and if all is well then you issue a commit, else if the transaction fails, then you issue a rollback. Hope this helps.(theTeacha)

 

Improve Answer Discuss the question "Can you use a commit statement within a database trigger?" Watch Question

First answer by TheTeacha. Last edit by TheTeacha. Contributor trust: 107 [recommend contributor]. Question popularity: 80 [recommend question]


Research your answer:

Can you answer other questions about programming?

Answers.com > Wiki Answers > Categories > Technology > Computers > Computer Programming > Can you use a commit statement within a database trigger?

Our contributors said this page should be displayed for the questions below. (Where do these come from)
If any of these are not a genuine rephrasing of the question, please help out and edit these alternates.
3 Can you use a commit statement within a database trigger?