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



Is it possible to use Transaction control Statements such a ROLLBACK or COMMIT in Database Trigger ..

Answer / chintu

It is not possible. but if we want to put we use autonomous
transaction.

Is This Answer Correct ?    13 Yes 0 No

Is it possible to use Transaction control Statements such a ROLLBACK or COMMIT in Database Trigger ..

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

Is it possible to use Transaction control Statements such a ROLLBACK or COMMIT in Database Trigger ..

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

Is it possible to use Transaction control Statements such a ROLLBACK or COMMIT in Database Trigger ..

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

Is it possible to use Transaction control Statements such a ROLLBACK or COMMIT in Database Trigger ..

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

Post New Answer

More SQL PLSQL Interview Questions

How do I write a cron which will run a sql query and mail the results to agroup?

0 Answers  


explain normalization concept? : Sql dba

0 Answers  


Why plvtab is considered as the easiest way to access the pl/sql table?

0 Answers  


what command is used to create a table by copying the structure of another table including constraints ?

6 Answers   CMC, eicc,


how to include numeric values in sql statements? : Sql dba

0 Answers  






What is PL/SQL table ?

6 Answers  


what is 'force view'?

3 Answers   Cap Gemini, SPIC,


Which tcp/ip port does sql server run?

0 Answers  


how to create a table index in mysql? : Sql dba

0 Answers  


If there are 1 to 100 numbers in a table and in that 100 numbers some 10 numbers are deleted.I want to find out the missing numbers between 1 to 100 by pl/sql how?

9 Answers   JPMorgan Chase,


What is normalisation in sql?

0 Answers  


What will be the output of this Query? select to_char(trunc(add_months(sysdate-3),mm),mm/dd/yyyy) from dual

6 Answers   Cap Gemini, TCS,


Categories