PLS_INTEGER in action : PLS_INTEGER « PL SQL Data Types « Oracle PL/SQL Tutorial






SQL>
SQL> SET SERVEROUTPUT ON
SQL> DECLARE
  2     v_count PLS_INTEGER := 1;
  3  BEGIN
  4     LOOP
  5        DBMS_OUTPUT.PUT_LINE('Ah -- Much better');
  6        v_count := v_count + 1;
  7        EXIT WHEN v_count = 20;
  8     END LOOP;
  9  END;
 10  /
Ah -- Much better
Ah -- Much better
Ah -- Much better
Ah -- Much better
Ah -- Much better
Ah -- Much better
Ah -- Much better
Ah -- Much better
Ah -- Much better
Ah -- Much better
Ah -- Much better
Ah -- Much better
Ah -- Much better
Ah -- Much better
Ah -- Much better
Ah -- Much better
Ah -- Much better
Ah -- Much better
Ah -- Much better

PL/SQL procedure successfully completed.

SQL>








21.19.PLS_INTEGER
21.19.1.PLS_INTEGER
21.19.2.PLS_INTEGER in action
21.19.3.Use PLS_INTEGER as the loop counter