What does FETCH statement do in DB2 cursor operations?

  • Deletes the current row from the result set of the cursor
  • Inserts a new row into the result set of the cursor
  • Retrieves the next row from the result set of the cursor
  • Updates the current row in the result set of the cursor
The FETCH statement in DB2 cursor operations is used to retrieve the next row from the result set of the cursor. Each time FETCH is executed, it advances the cursor to the next row in the result set, allowing the application to process the rows sequentially. FETCH returns the data from the current row and moves the cursor to the subsequent row for subsequent fetch operations. 
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *