2 $PostgreSQL: pgsql/doc/src/sgml/ref/move.sgml,v 1.29 2005/01/04 00:39:53 tgl Exp $
3 PostgreSQL documentation
6 <refentry id="SQL-MOVE">
8 <refentrytitle id="SQL-MOVE-TITLE">MOVE</refentrytitle>
9 <refmiscinfo>SQL - Language Statements</refmiscinfo>
13 <refname>MOVE</refname>
14 <refpurpose>position a cursor</refpurpose>
17 <indexterm zone="sql-move">
18 <primary>MOVE</primary>
21 <indexterm zone="sql-move">
22 <primary>cursor</primary>
23 <secondary>MOVE</secondary>
28 MOVE [ <replaceable class="PARAMETER">direction</replaceable> { FROM | IN } ] <replaceable class="PARAMETER">cursorname</replaceable>
33 <title>Description</title>
36 <command>MOVE</command> repositions a cursor without retrieving any data.
37 <command>MOVE</command> works exactly like the <command>FETCH</command>
38 command, except it only positions the cursor and does not return rows.
43 <xref linkend="sql-fetch" endterm="sql-fetch-title">
44 for details on syntax and usage.
49 <title>Outputs</title>
52 On successful completion, a <command>MOVE</> command returns a command
55 MOVE <replaceable class="parameter">count</replaceable>
57 The <replaceable class="parameter">count</replaceable> is the number
58 of rows that a <command>FETCH</command> command with the same parameters
59 would have returned (possibly zero).
64 <title>Examples</title>
68 DECLARE liahona CURSOR FOR SELECT * FROM films;
70 -- Skip the first 5 rows:
71 MOVE FORWARD 5 IN liahona;
74 -- Fetch the 6th row from the cursor liahona:
76 code | title | did | date_prod | kind | len
77 -------+--------+-----+------------+--------+-------
78 P_303 | 48 Hrs | 103 | 1982-10-22 | Action | 01:37
81 -- Close the cursor liahona and end the transaction:
88 <title>Compatibility</title>
91 There is no <command>MOVE</command> statement in the SQL standard.
96 <title>See Also</title>
98 <simplelist type="inline">
99 <member><xref linkend="sql-close" endterm="sql-close-title"></member>
100 <member><xref linkend="sql-declare" endterm="sql-declare-title"></member>
101 <member><xref linkend="sql-fetch" endterm="sql-fetch-title"></member>
106 <!-- Keep this comment at the end of the file
111 sgml-minimize-attributes:nil
112 sgml-always-quote-attributes:t
115 sgml-parent-document:nil
116 sgml-default-dtd-file:"../reference.ced"
117 sgml-exposed-tags:nil
118 sgml-local-catalogs:"/usr/lib/sgml/catalog"
119 sgml-local-ecat-files:nil