MOVE
SQL - Language Statements
MOVE
Moves cursor position
1998-09-01
MOVE [ selector ] { [ # | ALL ] } IN cursor
1998-09-01
Inputs
selector
FORWARD
Skip next row(s), it is assumed by default
if selector is omitted.
BACKWARD
Skip previous row(s).
#
An unsigned integer that specify how many rows to skip.
ALL
Skip all remaining rows.
cursor
An open cursor's name.
1998-09-01
Outputs
MOVE
Message returned if successfully.
NOTICE: PerformPortalFetch: portal cursor not found.
If cursor is not declared.
1998-04-15
Description
MOVE allows a user to move cursor position for specified
number of rows. MOVE works like fetch command: it
fetches rows, but put them nowhere.
1998-04-15
Notes
MOVE is a Postgres language extension.
Refer to FETCH statements for further description
of valid arguments.
Refer to DECLARE statements to declare a cursor.
Refer to BEGIN WORK, COMMIT WORK, ROLLBACK WORK statements
for further information 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;
--Fetch 6th row in the cursor liahona:
--
FETCH 1 IN liahona;
code |title |did| date_prod|kind |len
-----+------+---+----------+----------+------
P_303|48 Hrs|103|1982-10-22|Action | 01:37
-- close the cursor liahona and commit work:
--
CLOSE liahona;
COMMIT WORK;
Compatibility
1998-09-01
SQL92
There is no SQL92 MOVE statement.