MOVE [ selector ] { [ # | ALL ] } IN cursor
Skip next row(s), it is assumed by default if selector is omitted.
Skip previous row(s).
An unsigned integer that specify how many rows to skip.
Skip all remaining rows.
An open cursor's name.
Message returned if successfully.
If cursor is not declared.
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.
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.
--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;
There is no SQL92 MOVE statement.