CREATE OR REPLACE PROCEDURE PROC AS i NUMBER; j NUMBER; BEGIN i := 1; WHILE i <= 100 LOOP dbms_output.put_line(i); i := i + 1; END LOOP; FOR j in 1 .. 100 LOOP dbms_output.put_line(j); END LOOP; EXCEPTION WHEN OTHERS THEN BEGIN ROLLBACK; END; END PROC;
原文地址:http://blog.csdn.net/jxzkin/article/details/42121637