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!

Commit only a DML command inside a package (commit only a specific transaction)

Yellow75Aug 23 2018 — edited Aug 28 2018

Hi,

I've searched in the documentation, but find only SAVEPOINT clause for exceptions handling; is there a way to commit only a DML command? For example, in a package:

...

some dml commands (delete, update, etc)

no commit or rollaback here

--Query to commit (query_z):

UPDATE TBXYZ

SET COLUMN1=1;

COMMIT;

The following piece of code commit or rollback everything except for query_z (it was already committed):

if (all_right=1) then

commit;

else

rollback;

end if;

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

PL/SQL Release 11.2.0.3.0 - Production

"CORE 11.2.0.3.0 Production"

TNS for IBM/AIX RISC System/6000: Version 11.2.0.3.0 - Production

NLSRTL Version 11.2.0.3.0 - Production

This post has been answered by Yellow75 on Aug 28 2018
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 25 2018
Added on Aug 23 2018
10 comments
693 views