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?

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.

Explanation:



Leave a Reply 5

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


samkelo siyabonga ngubo

samkelo siyabonga ngubo

C

Yannick

Yannick

should be D instead

monika

monika

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;

PL/SQL procedure successfully completed.

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