BEGIN
UPDATE scott.emp
SET ename = 'Test Employee'
WHERE empno = 0;
EXCEPTION
WHEN NO_DATA_FOUND THEN
DBMS_OUTPUT.PUT_LINE('Inside NO_DATA_FOUND Exception');
WHEN INVALID_NUMBER THEN
DBMS_OUTPUT.PUT_LINE('Inside INVALID_NUMBER Exception');
WHEN LOGIN_DENIED THEN
DBMS_OUTPUT.PUT_LINE('Inside LOGIN_DENIED Exception');
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE('Inside OTHERS Exception');
END;
Ans:-
It wont go to any exception and it will run successfully.
UPDATE scott.emp
SET ename = 'Test Employee'
WHERE empno = 0;
EXCEPTION
WHEN NO_DATA_FOUND THEN
DBMS_OUTPUT.PUT_LINE('Inside NO_DATA_FOUND Exception');
WHEN INVALID_NUMBER THEN
DBMS_OUTPUT.PUT_LINE('Inside INVALID_NUMBER Exception');
WHEN LOGIN_DENIED THEN
DBMS_OUTPUT.PUT_LINE('Inside LOGIN_DENIED Exception');
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE('Inside OTHERS Exception');
END;
Ans:-
It wont go to any exception and it will run successfully.
No comments:
Post a Comment