DBMS_OUTPUT.PUT_LINE (item IN VARCHAR2);
-- 必须有,不然无法显示会报错 SET SERVEROUTPUT ON DECLARE NUM INT := 0; num_max INT := 8; BEGIN dbms_output.put_line('FOR i IN 0 .. 3'); FOR i IN 0 .. 3 LOOP dbms_output.put_line('f(' || i || ') = ' || i); END LOOP; dbms_output.put_line('FOR i IN 1 .. 3'); FOR i IN 1 .. 3 LOOP dbms_output.put_line('f(' || i || ') = ' || i); END LOOP; dbms_output.put_line('FOR i IN ' || NUM || ' .. ' || num_max); FOR i IN NUM .. num_max LOOP dbms_output.put_line('f(' || i || ') = ' || i); END LOOP; END;