While Loop with condition
SQL> SQL> SET SERVEROUTPUT ON SQL> DECLARE 2 counter INTEGER := 2; 3 BEGIN 4 5 6 counter := 0; 7 WHILE counter < 6 LOOP 8 counter := counter + 1; 9 DBMS_OUTPUT.PUT_LINE(counter); 10 END LOOP; 11 END; 12 / 1 2 3 4 5 6 PL/SQL procedure successfully completed. SQL>