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>