SQL>
SQL> set serveroutput on
SQL> set echo on
SQL>
SQL> DECLARE
2 v_Start Integer := 1;
3 BEGIN
4 FOR v_loopcounter IN REVERSE v_Start..5 LOOP
5 DBMS_OUTPUT.PUT_LINE('Loop counter is ' || v_loopcounter);
6 END LOOP;
7 END;
8 /
Loop counter is 5
Loop counter is 4
Loop counter is 3
Loop counter is 2
Loop counter is 1
PL/SQL procedure successfully completed.
SQL>
|