Is it possible to use Transaction control Statements such a
ROLLBACK or COMMIT in Database Trigger ? Why ?
Answers were Sorted based on User's Feedback
Answer / chintu
It is not possible. but if we want to put we use autonomous
transaction.
Is This Answer Correct ? | 13 Yes | 0 No |
Answer / deva
yes we cannot make TCL commands with in triggers. If the
block is declared as a autonomous transaction, then commit
and rollback can be given in the end of the block
Is This Answer Correct ? | 6 Yes | 1 No |
Answer / aravinda
We can't write COMMIT or ROLLBACK in triggers, because the
triggering event may commit or may not. trigger commit or
rollback is based on triggering event.
even we can't call a subprogram in a trigger which is having
commit or rollback.
but we can achieve through pragma autonomous transaction.
Is This Answer Correct ? | 5 Yes | 0 No |
Answer / nishi
We can't write COMMIT or ROLLBACK in triggers, because the triggering event may commit or may not. trigger commit or rollback is based on triggering event.
even we can't call a subprogram in a trigger which is having commit or rollback.
but we can achieve through pragma autonomous transaction.
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / tulsi
It is not possible. As triggers are defined for each table,
if you use COMMIT of ROLLBACK in a trigger, it affects
logical transaction processing.
Is This Answer Correct ? | 4 Yes | 7 No |
Which nosql database is best?
What are the steps you take to tune(performance tuning) the code in plsql?
4 Answers Cap Gemini, Infosys, TCS,
how to create object in plsql
how to show all tables with 'mysql'? : Sql dba
What is the difference between instead of trigger and after trigger?
what is transaction? : Sql dba
How do you update sql?
What is rownum?
How can I pass the inner procedure value to outer procedure ?
What is autocommit sql?
How to test for null values?
Which is faster joins or subqueries?