Discussion
In what correct order must the following PL/SQL cursor operations be performed ?
Answer: D
The correct order is DECLARE → OPEN → FETCH → CLOSE.
An explicit cursor is first declared with its query in the declaration section. OPEN then runs the query and identifies the result set. FETCH retrieves the rows one at a time into variables, usually in a loop until %NOTFOUND. CLOSE finally releases the cursor's resources.
A cursor cannot be opened before it is declared, and nothing can be fetched before it is opened, so every other order fails at its first step.
No comment is present. Be the first to comment.
Loading…
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development