Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Start transaction in PL/SQL progam

3ff49559-10cd-43c5-850f-10216332ea6dFeb 19 2020 — edited Feb 20 2020

Hi All,

1. How can we start transaction in the begining of PL/SQL program (for eg a porcedure which is doing inserts and updates)? Is it really needed and why?

I am asking this question as someone asked me this in an interview. Though I think that in Oracle its implicit and there is no need or there is nothing like to start transaction in the begining of a procedure. In Oracle, the transaction should start when the procedure executes and performs inserts / update and should complete with a commit (or rollback if a rollback is issued). If a system crashes then it will be rollbacked anyway. So it will be all or none activity. I have not heard of manually or explicitly starting a transaction in the begining of a procedure.

Please let me know.

Thanks for the help.

AKS

Comments
Post Details
Added on Feb 19 2020
2 comments
1,610 views