Question

Locked

PL/SQL update counting rows

By john.a.wills ·
Tags: Software
I want to count the rows updated by my Update statement. What I envisage is something like this:
Update SuchAndSuchATable
Set col1 = 'X',
col2 = 'Y'
WHERE col3 = 'Z'
Returning count Into local_counter;
case local_counter
when 0
then
Alert ('Nothing updated');
when 1
then
null;
else
Alert (local_counter || ' rows got updated');
end case;
The RETURNING phrase in (PL/)SQL does not do quite this, but surely there is some way it can be done.

This conversation is currently closed to new comments.

0 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Share your knowledge
Back to Software Forum
0 total posts (Page 1 of 1)  

Related Discussions

Related Forums