Imported upstream version 1.5
[manpages-zh.git] / raw / man7 / move.7
blob75e4ef82ead0882a0a534183199065590f405c4f
1 .\\" auto-generated by docbook2man-spec $Revision: 1.1 $
2 .TH "MOVE" "7" "2003-11-02" "SQL - Language Statements" "SQL Commands"
3 .SH NAME
4 MOVE \- position a cursor
6 .SH SYNOPSIS
7 .sp
8 .nf
9 MOVE [ \fIdirection\fR { FROM | IN } ] \fIcursorname\fR
10 .sp
11 .fi
12 .SH "DESCRIPTION"
13 .PP
14 \fBMOVE\fR repositions a cursor without retrieving any data.
15 \fBMOVE\fR works exactly like the \fBFETCH\fR
16 command, except it only positions the cursor and does not return rows.
17 .PP
18 Refer to 
19 FETCH [\fBfetch\fR(7)]
20 for details on syntax and usage.
21 .SH "OUTPUTS"
22 .PP
23 On successful completion, a \fBMOVE\fR command returns a command
24 tag of the form
25 .sp
26 .nf
27 MOVE \fIcount\fR
28 .sp
29 .fi
30 The \fIcount\fR is the number
31 of rows moved over (possibly zero).
32 .SH "EXAMPLES"
33 .sp
34 .nf
35 BEGIN WORK;
36 DECLARE liahona CURSOR FOR SELECT * FROM films;
38 -- Skip the first 5 rows:
39 MOVE FORWARD 5 IN liahona;
40 MOVE 5
42 -- Fetch the 6th row from the cursor liahona:
43 FETCH 1 FROM liahona;
44  code  | title  | did | date_prod  |  kind  |  len
45 -------+--------+-----+------------+--------+-------
46  P_303 | 48 Hrs | 103 | 1982-10-22 | Action | 01:37
47 (1 row)
49 -- Close the cursor liahona and end the transaction:
50 CLOSE liahona;
51 COMMIT WORK;
52 .sp
53 .fi
54 .SH "COMPATIBILITY"
55 .PP
56 There is no \fBMOVE\fR statement in the SQL standard.