2 $PostgreSQL: pgsql/doc/src/sgml/ref/move.sgml,v 1.28 2004/06/17 12:41:02 momjian 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 <!-- Keep this comment at the end of the file
101 sgml-minimize-attributes:nil
102 sgml-always-quote-attributes:t
105 sgml-parent-document:nil
106 sgml-default-dtd-file:"../reference.ced"
107 sgml-exposed-tags:nil
108 sgml-local-catalogs:"/usr/lib/sgml/catalog"
109 sgml-local-ecat-files:nil