Skip to main content

PL/SQL Multiple Loop Transactions


declare
  v_counter number;
begin
  v_counter := 0;
  for i in 1..20 loop
      v_counter:=v_counter+1;
      dbms_output.put_line(i || '. value is: '||v_counter);
      if v_counter=10 then
            commit;
            v_counter:=0;
          end if;
    end loop;
end;

Comments