plsql 的三种循环
set serveroutput on declare pnum number :=1 ; begin while pnum<=10 loop dbms_output.put_line(pnum); pnum :=pnum+1; end loop; end; / set serveroutput on declare pnum number :=1 ; begin loop exit when pnum>10; dbms_output.put_line(pnum); pnum :=pnum+1; end loop; end; / set serveroutput on declare pnum number :=1 ; begin for pnum in 1..10 loop dbms_output.put_line(pnum); end loop; end; /
无为而治