定义:
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;
原创文章,作者:奋斗,如若转载,请注明出处:https://blog.ytso.com/272286.html