What is the outcome?

View the exhibit and examine the structure of the EMPLOYEES table.


The salary of EMPLOYEE_ID 195 is 2800.
You execute the following code


What is the outcome?
A. It gives an error because only the innermost block is labeled.
B. It gives an error because the same variable name cannot be used across all the nested blocks.
C. It executes successfully and displays the resultant values in the following sequence- 1000, 2800 50000, 2800.
D. It executes successfully and displays the resultant values in the following sequence: 1000, 2800, 50000, 1000.

Download Printable PDF. VALID exam to help you PASS.

One thought on “What is the outcome?

  1. I think that correct answer is C.
    Tested with below code in HR schema:

    set serveroutput on;
    declare
    v_sal number(10,2):=1000;
    begin
    dbms_output.put_line(‘Salary is ‘||v_sal);
    declare
    v_sal number;
    begin
    select salary into v_sal from employees where employee_id=195;
    dbms_output.put_line(‘Salary is ‘||v_sal);
    declare
    v_sal number:=50000;
    begin <>
    dbms_output.put_line(‘Salary is ‘||v_sal);
    end b3;
    dbms_output.put_line(‘Salary is ‘||v_sal);
    end;
    end;
    /

    Salary is 1000
    Salary is 2800
    Salary is 50000
    Salary is 2800

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.