1Z0-146 · Question #97
View Exhibit1 and examine the structure of the EMPLOYEES and DEPARTMENTS tables existing in your schem a. View Exhibit2 and examine the PL/SQL block that you execute to display the department-wise…
The correct answer is A. The cursor variable parameter should be passed in IN OUT mode. When you declare a cursor variable as the formal parameter of a subprogram that opens the cursor variable, you must specify the IN OUT mode. That way, the subprogram can pass an open cursor back to the caller.
Question
View Exhibit1 and examine the structure of the EMPLOYEES and DEPARTMENTS tables existing in your schem a. View Exhibit2 and examine the PL/SQL block that you execute to display the department-wise incremented salary for all the departments in your company. The code generates an error on execution. What correction should be done to ensure the code executes successfully?
Exhibits
Options
- AThe cursor variable parameter should be passed in IN OUT mode.
- BThe cursor variable should be defined as a strong REF CURSOR type.
- CThe cursor variable name passed as actual and formal parameters should be identical.
- DThe %NOTFOUND cursor attribute cannot be used with the cursor variables and should be replaced
How the community answered
(24 responses)- A79% (19)
- B4% (1)
- C4% (1)
- D13% (3)
Explanation
When you declare a cursor variable as the formal parameter of a subprogram that opens the cursor variable, you must specify the IN OUT mode. That way, the subprogram can pass an open cursor back to the caller.
Topics
Community Discussion
No community discussion yet for this question.

