给你一个处理的示例: DECLARE v_descr VARCHAR2(20); BEGIN SELECT hrc_descr INTO v_descr FROM hrc_tab WHERE hrc_code = 10; dbms_output.put_line(' The hierarchy description for code 10 is: '||v_descr); EXCEPTION WHEN NO_DATA_FOUND THEN dbms_output.put_line('ERR: Invalid Hierarchy Code 10'); END; /
ORA-06512: at stringline string Cause: Backtrace message as the stack is unwound by unhandled exceptions. Action: Fix the problem causing the exception or write an exception handler for this condition. Or you may need to contact your application administrator or DBA.
DECLARE
v_descr VARCHAR2(20);
BEGIN
SELECT hrc_descr
INTO v_descr
FROM hrc_tab
WHERE hrc_code = 10;
dbms_output.put_line(' The hierarchy description for code 10 is: '||v_descr);
EXCEPTION WHEN NO_DATA_FOUND THEN
dbms_output.put_line('ERR: Invalid Hierarchy Code 10');
END;
/
Cause: Backtrace message as the stack is unwound by unhandled exceptions.
Action: Fix the problem causing the exception or write an exception handler for this condition. Or you may need to contact your application administrator or DBA.