set serveroutput on
declare
cursor c1 is
select a,B from ab;
counter integer := 0;
begin
for cr in c1 loop
update item
set BASIC_PRICE=cr.b
where itemcode=cr.a;
counter := counter + sql%rowcount;
end loop;
dbms_output.put_line('Number of total lines affected update operation: '||counter);
end;
/
Number of total lines affected update operation: 128
PL/SQL procedure successfully completed.
No comments:
Post a Comment