How we find User defined error message for Oracle Error?
DECLARE
a NUMBER;
b VARCHAR2(10);
deadlock_detected EXCEPTION
pragma EXCEPTION_INIT(deadlock_detected,-0060);
BEGIN
select count(*) INTO a FROM emp;
EXCEPTION
WHEN deadlock_detected THEN
dbms_output.put_line('deadlock_detected');
WHEN OTHERS THEN
dbms_output.put_line('Other error');
END;
No comments:
Post a Comment