Monday, October 23, 2017

What happens when updating a record which does not exists in oracle(Any DML operation)?

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.

No comments:

Post a Comment

SupplierAddressImportTemplate.xlsm South Africa Suburb Field mapping in POZ_SUPPLIER_ADDRESSES_INT

Suburb mpping in Supplier Address Import Template will be mapped to Address Element Attribute2 (HZ_LOCATIONS. ADDR_ELEMENT_ATTRIBUTE2)