1MOVE(7)                          SQL Commands                          MOVE(7)
2
3
4

NAME

6       MOVE - position a cursor
7
8

SYNOPSIS

10       MOVE [ direction { FROM | IN } ] cursorname
11
12

DESCRIPTION

14       MOVE  repositions  a  cursor  without  retrieving any data.  MOVE works
15       exactly like the FETCH command, except it only positions the cursor and
16       does not return rows.
17
18       The parameters for the MOVE command are identical to those of the FETCH
19       command; refer to FETCH [fetch(7)] for details on syntax and usage.
20

OUTPUTS

22       On successful completion, a MOVE command returns a command tag  of  the
23       form
24
25       MOVE count
26
27       The  count  is  the  number  of rows that a FETCH command with the same
28       parameters would have returned (possibly zero).
29

EXAMPLES

31       BEGIN WORK;
32       DECLARE liahona CURSOR FOR SELECT * FROM films;
33
34       -- Skip the first 5 rows:
35       MOVE FORWARD 5 IN liahona;
36       MOVE 5
37
38       -- Fetch the 6th row from the cursor liahona:
39       FETCH 1 FROM liahona;
40        code  | title  | did | date_prod  |  kind  |  len
41       -------+--------+-----+------------+--------+-------
42        P_303 | 48 Hrs | 103 | 1982-10-22 | Action | 01:37
43       (1 row)
44
45       -- Close the cursor liahona and end the transaction:
46       CLOSE liahona;
47       COMMIT WORK;
48
49

COMPATIBILITY

51       There is no MOVE statement in the SQL standard.
52

SEE ALSO

54       CLOSE [close(7)], DECLARE [declare(7)], FETCH [fetch(7)]
55
56
57
58SQL - Language Statements         2011-09-22                           MOVE(7)
Impressum