MOVE

    where forward_direction can be empty or one of:

    1. FIRST
    2. LAST
    3. ABSOLUTE <count>
    4. RELATIVE <count>
    5. <count>
    6. ALL
    7. FORWARD <count>
    8. FORWARD ALL

    Description

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

    Note that it is not possible to move a cursor position backwards in Greenplum Database, since scrollable cursors are not supported. You can only move a cursor forward in position using MOVE.

    Outputs

    On successful completion, a MOVE command returns a command tag of the form

    forward_direction

    See FETCH for more information.

    cursorname

    The name of an open cursor.

    Examples

    -- Start the transaction:

    1. BEGIN;

    -- Move forward 5 rows in the cursor mycursor:

    1. MOVE FORWARD 5 IN mycursor;
    2. MOVE 5

    --Fetch the next row after that (row 6):

    -- Close the cursor and end the transaction:

    1. CLOSE mycursor;

    There is no statement in the SQL standard.

    See Also

    DECLARE, , CLOSE