# MOVE - man(7) - [phpMan]

[_MOVE_(7)](https://www.chedong.com/phpMan.php/man/MOVE/7/markdown)                            PostgreSQL 16.14 Documentation                            [_MOVE_(7)](https://www.chedong.com/phpMan.php/man/MOVE/7/markdown)

## NAME
       MOVE - position a cursor

## SYNOPSIS
       MOVE [ _direction_ ] [ FROM | IN ] _cursor_name_

       where _direction_ can be one of:

           NEXT
           PRIOR
           FIRST
           LAST
           ABSOLUTE _count_
           RELATIVE _count_
           _count_
           ALL
           FORWARD
           FORWARD _count_
           FORWARD ALL
           BACKWARD
           BACKWARD _count_
           BACKWARD 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.

       The parameters for the **MOVE **command are identical to those of the **FETCH **command; refer to
       [**FETCH**(7)](https://www.chedong.com/phpMan.php/man/FETCH/7/markdown) for details on syntax and usage.

## OUTPUTS
       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
           BEGIN WORK;
           DECLARE liahona CURSOR FOR SELECT * FROM films;

           -- Skip the first 5 rows:
           MOVE FORWARD 5 IN liahona;
           MOVE 5

           -- Fetch the 6th row from the cursor liahona:
           FETCH 1 FROM liahona;
            code  | title  | did | date_prod  |  kind  |  len
           -------+--------+-----+------------+--------+-------
            P_303 | 48 Hrs | 103 | 1982-10-22 | Action | 01:37
           (1 row)

           -- Close the cursor liahona and end the transaction:
           CLOSE liahona;
           COMMIT WORK;

## COMPATIBILITY
       There is no **MOVE **statement in the SQL standard.

## SEE ALSO
       [**CLOSE**(7)](https://www.chedong.com/phpMan.php/man/CLOSE/7/markdown), [**DECLARE**(7)](https://www.chedong.com/phpMan.php/man/DECLARE/7/markdown), [**FETCH**(7)](https://www.chedong.com/phpMan.php/man/FETCH/7/markdown)

PostgreSQL 16.14                                2026                                         [_MOVE_(7)](https://www.chedong.com/phpMan.php/man/MOVE/7/markdown)
