...
COMMIT;
--输出成功信息
DBMS_OUTPUT.PUT_LINE(‘RUN RESULT: SUCCESS‘);
EXCEPTION WHEN OTHERS THEN
BEGIN
ROLLBACK;
--输出错误信息
dbms_output.put_line(to_char(DBMS_UTILITY.format_error_backtrace)
||chr(10)||to_char(sqlcode)
||chr(10)||‘ERROR ‘||SQLERRM);
END;