SQL>
SQL>
SQL> set serveroutput on
SQL>
SQL> DECLARE
2
3 start_period_number pls_integer := 1;
4 end_period_number pls_integer := 10;
5 current_period pls_integer := 5;
6
7 BEGIN
8
9 dbms_output.put_line('reverse loop...');
10 FOR loop_counter IN REVERSE 1 .. 10
11 LOOP
12 dbms_output.put_line(loop_counter);
13 -- ... executable statements ...
14 END LOOP;
15
16
17 END;
18 /
reverse loop...
10
9
8
7
6
5
4
3
2
1
PL/SQL procedure successfully completed.
SQL>
SQL>
|