Oracle
1Z0-146 · Question #145
Given this executable section of a PL/SQL block: BEGIN FOR employee_record IN salary_cursor LOOP employee_id_table(employee_id) := employee_record.last_name; END LOOP; CLOSE salary_cursor; END; Why…
The correct answer is D. The cursor does not need to be closed. See the full explanation below for the reasoning.
Question
Given this executable section of a PL/SQL block:
BEGIN FOR employee_record IN salary_cursor LOOP employee_id_table(employee_id) := employee_record.last_name; END LOOP; CLOSE salary_cursor; END; Why does this section cause an error?
Options
- AThe cursor needs to be opened.
- BNo FETCH statements were issued.
- CTerminating conditions are missing.
- DThe cursor does not need to be closed.
How the community answered
(33 responses)- A12% (4)
- B6% (2)
- C3% (1)
- D79% (26)
Community Discussion
No community discussion yet for this question.