开始
set serveroutput on; DECLARE e_no_rows EXCEPTION; e_integrity EXCEPTION; BEGIN BEGIN RAISE e_no_rows; END; EXCEPTION WHEN e_no_rows THEN DBMS_OUTPUT.PUT_LINE('no rows exception'); END;
运行结果:
anonymous block completed no rows exception
结束