Description

Nested For loop

Demo

SQL>
SQL> declare--  w  ww  .j  a v  a 2 s.co m
  2        v_main_nr NUMBER;
  3  begin
  4        for main_c in 0..5
  5        loop
  6             v_main_nr := main_c * 5;
  7
  8             for inner_c in 1..4
  9             loop
 10                  DBMS_OUTPUT.put_line(v_main_nr);
 11             end loop;
 12        end loop;
 13  end;
 14  /
0
0
0
0
5
5
5
5
10
10
10
10
15
15
15
15
20
20
20
20
25
25
25
25

PL/SQL procedure successfully completed.
SQL>

Related Topic