Oracle
1Z0-146 · Question #114
1Z0-146 Question #114: Real Exam Question with Answer & Explanation
Sign in or unlock 1Z0-146 to reveal the answer and full explanation for question #114. The question stem and answer options stay visible for context.
Question
View the Exhibit and examine the structure of the EMPLOYEES table. Examine the following PL/SQL block for storing the salary of all sales representatives from the EMPLOYEES table in an associative array: 1 DECLARE 2 emp_cv SYS_REFCURSOR; 3 TYPE list IS TABLE OF emp_cv; 4 sals list; 5 BEGIN 6 OPEN emp_cv FOR SELECT salary FROM employees 7 WHERE job_id = 'SA_REP'; 8 FETCH emp_cv BULK COLLECT INTO sals; 9 CLOSE emp_cv; 10 END; What should you correct in the above code to ensure that it executes successfully?
Exhibit
Options
- AReplace EMP_CV in line 3 with employees.salary%TYPE.
- BReplace line 2 with TYPE refcur IS REF CURSOR; emp_cv refcur;.
- CReplace BULK COLLECT in line 8 with the OPEN, FETCH, LOOP, and CLOSE statements.
- DReplace line 2 with TYPE refcur IS REF CURSOR RETURN employees.salary%TYPE; emp_cv refcur;.
Unlock 1Z0-146 to see the answer
You've previewed enough free 1Z0-146 questions. Unlock 1Z0-146 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.
