Computer Science


MOVE(l)                                                   MOVE(l)

NAME
       MOVE - Moves cursor position

SYNOPSIS
       MOVE [ selector ] [ count ]
           { IN | FROM } cursor
           FETCH [ RELATIVE ] [ { [ # | ALL | NEXT | PRIOR ] } ] FROM ] cursor

DESCRIPTION
       MOVE  allows  a  user  to move cursor position a specified
       number of rows.  MOVE works like the  FETCH  command,  but
       only positions the cursor and does not return rows.

       Refer to fetch(l) for details on syntax and usage.

   NOTES
       MOVE is a Postgres language extension.

       Refer  to  fetch(l)  for a description of valid arguments.
       Refer  to  declare(l)  to  define  a  cursor.   Refer   to
       begin(l),  commit(l), and rollback(l) for further informa-
       tion about transactions.

USAGE
       Set up and use a cursor:

       BEGIN WORK;
       DECLARE liahona CURSOR  FOR SELECT * FROM films;
       --Skip first 5 rows:
       MOVE FORWARD 5 IN liahona;
       MOVE
       --Fetch 6th row in the cursor liahona:
       FETCH 1 IN liahona;
       FETCH

         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 commit work:
       CLOSE liahona;
       COMMIT WORK;

COMPATIBILITY
   SQL92
       There is no SQL92 MOVE statement.  Instead,  SQL92  allows
       one  to  FETCH  rows  from  an  absolute  cursor position,
       implicitly moving the cursor to the correct position.

SQL - Language Statements 15 August 1999                        1

Back to the index


Apply now!


Handbook

Postgraduate study options

Computer Science Blog



Please give us your feedback or ask us a question

This message is...


My feedback or question is...


My email address is...

(Only if you need a reply)

A to Z Directory | Site map | Accessibility | Copyright | Privacy | Disclaimer | Feedback on this page