Using Scrollable Cursors with fetch_direction

Additional information for using scrollable cursors with fetch_direction.

  • If not specified, the default value is next.

  • If not next, the cursor must be declared scrollable.

  • fetch_offset must be an exact, signed numeric, with a scale of zero.

  • Positions the cursor beyond the last row or before the first row, no data is returned and no error is raised.

  • Is absolute, when fetch_offset >0, the offset is calculated from the position before the first row of the result set. If fetch_offset <0, the offset is calculated from the position after the last row of the result set.

  • Is relative, when fetch_offset n>0, the cursor is placed n rows after the current position; if fetch_offset n<0, the cursor is placed abs (n) rows before the current position.

The row number specified in the result set is counted from 1; the first row is number 1.