Basic Loops

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

Basic Loops (Code Samples)

-------------------------BASIC LOOPS--------------------------
declare
v_counter number(2) := 1;
begin
loop
dbms_output.put_line('My counter is : '|| v_counter);
v_counter := v_counter + 1;
--if v_counter = 10 then
-- dbms_output.put_line('Now I reached : '|| v_counter);
-- exit;
--end if;
exit when v_counter > 10;
end loop;
end;
--------------------------------------------------------------

You might also like