The FETCH statement increments cursors to step through the response set rows.
Stored procedure cursors have some additional facilities that enable more flexibility than embedded SQL cursors possess:
- The FIRST and NEXT options of the FETCH statement and the SCROLL and NO SCROLL options of the DECLARE CURSOR statement enable cursors to either scroll forward to the next row in the spool or to scroll directly to the first row in the spool.
- Within a FOR loop, a cursor moves to the next row with each iteration of the loop.