MOVE

Function

MOVE repositions a cursor without retrieving any data. MOVE works exactly like the FETCH command, except it only repositions the cursor and does not return rows.

Precautions

None

Syntax

MOVE [ direction [ FROM | IN ] ] cursor_name;

The direction clause specifies optional parameters.

NEXT
   | PRIOR
   | FIRST
   | LAST
   | ABSOLUTE count
   | RELATIVE count
   | count
   | ALL
   | FORWARD
   | FORWARD count
   | FORWARD ALL
   | BACKWARD
   | BACKWARD count
   | BACKWARD ALL

Parameter Description

MOVE command parameters are the same as FETCH command parameters. For details, see Parameter Description in FETCH.

Note

On successful completion, a MOVE command returns a command tag of the form MOVE count. The count is the number of rows that a FETCH command with the same parameters would have returned (possibly zero).

Examples

Skip the first three rows of cursor1.

MOVE FORWARD 3 FROM cursor1;