Multiple choice technology databases

Which type of cursor should be used so that its position will be maintained between transactions

  1. FOR HOLD

  2. FOR UPDATE

  3. FOR FETCH

  4. WITH HOLD

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

The WITH HOLD option in cursor declaration maintains the cursor position across transaction boundaries. When a transaction commits, a WITH HOLD cursor remains open and positioned, allowing continued fetching without repositioning. FOR FETCH is not a valid DB2 cursor option.