SQL> SET SERVEROUTPUT ON;
SQL> DECLARE
2 i INTEGER;
3 total INTEGER := 0;
4 BEGIN
5 FOR i IN 1..100 LOOP
6 total := total + i;
7 END LOOP;
8 dbms_output.put_line( total );
9 END;
10 /
5050
PL/SQL procedure successfully completed.
SQL> @1.sql
5050
PL/SQL procedure successfully completed.
|