Which statement is true about the outcome on executing the above PL/SQL block?

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

Examine the following PL/SQL block:
DECLARE
TYPE EmpList
IS VARRAY(2) OF employees.employee_id%TYPE NOT NULL;
v_employees EmpList := EmpList();
BEGIN
DBMS_OUTPUT.PUT_LINE(v_employees.COUNT);
v_employees.EXTEND;
v_employees(1) := 30;
END;
/
Which statement is true about the outcome on executing the above PL/SQL block?

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

Examine the following PL/SQL block:
DECLARE
TYPE EmpList
IS VARRAY(2) OF employees.employee_id%TYPE NOT NULL;
v_employees EmpList := EmpList();
BEGIN
DBMS_OUTPUT.PUT_LINE(v_employees.COUNT);
v_employees.EXTEND;
v_employees(1) := 30;
END;
/
Which statement is true about the outcome on executing the above PL/SQL block?

A.
It executes successfully and displays the value 2.

B.
It executes successfully and displays the value 0.

C.
It generates an error because EXTEND cannot be used for varrays.

D.
It generates an error because the declaration of the varray is not valid.



Leave a Reply 4

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


Reviewer

Reviewer

C for sure

heena

heena

B .. Output will be 0