loop (3) 썸네일형 리스트형 010 - [Oracle PL/SQL] For Loop # basic for loop begin for i in 1..3 loop dbms_output.put_line('welcome '||i); end loop; end; ------------------------ begin for i in 1..1 loop dbms_output.put_line('welcome '||i); end loop; end; -------------------- begin for i in 3..5 loop dbms_output.put_line('welcome '||i); end loop; end; -------------------- welcome 1 welcome 2 welcome 3 welcome 1 welcome 3 welcome 4 welcome 5 # 감소하는 for 문 .. 009 - [Oracle PL/SQL] While Loop declare v_counter number:=1; begin while v_counter 008 - [Oracle PL/SQL] Basic Loop #basic loop #write a basic loop to print 'welcome' 3 times declare v_counter number:=0; begin loop v_counter:=v_counter+1; dbms_output.put_line('welcome ' ||v_counter); exit when v_counter>=3; end loop; end; -------------------------------------- #another method declare v_counter number:=0; begin loop v_counter:=v_counter+1; dbms_output.put_line('welcome ' ||v_counter); if v_counter>=3 then exit.. 이전 1 다음