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!

Automating commit based on number of rows updated

Andreas HessFeb 26 2010 — edited Feb 26 2010
Hi

Is there any way I can, within a SQL script, rollback or commit a transaction depending on how many rows were updated?

We often get requests to run data fixes into DBs and then need to manually commit, but only if the number of rows is whatever the developer has specified.

1. update tab1
2. if number of rows updated = 50, commit
3. If not, roll back

Thanks,
Andreas
This post has been answered by CGMS on Feb 26 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 26 2010
Added on Feb 26 2010
4 comments
785 views