Pragma Autonomous_Transaction in Oracle PL SQL Interview Questions And Answers For Experience & Freshers | Interview Preparation
By default oracle will not create separate transaction for the procedure.
Procedure always part of main transaction but separate transaction for procedure is not there. So commit or rollback in procedure affects transaction started in main program.
If we want to make separate transaction for the procedure then we are using pragma autonomous_transaction in declare section of the procedure. Now when we are using commit or rollback in procedure then it will affect only procedure transaction. It will not affect the main transaction.
Pragma autonomous_transaction is used in row level trigger for avoiding mutating error.
Please do check our daily posts, videos for beneficial informations, in case of any additional queries please do contact us, we are happy to assist you.
https://www.youtube.com/a4uofficial
0 Comments