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)
|
|
|
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?
|
|


