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!

Count how many rows have been updated in a BULK update statement

259178Nov 8 2006 — edited Nov 21 2006
Dear all
I have a PL/SQL FORALL statement that I use to bulk update a column in a table. The statement is like this

FORALL x IN 1..<array>.counter
UPDATE mytable
SET mycolumn = 'Y'
WHERE join_col1 = <array>.<column>(x);

mycounter := mycounter + SQL%ROWCOUNT;

The problem here is that SQL%ROWCOUNT counts the iterations within the FORALL loop and not how many rows are finally updated due to the join condition..
Any ideas ?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 19 2006
Added on Nov 8 2006
12 comments
2,588 views