From 293913568e6a7a86fd1479e1cff8e2ecb58d6568 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 13 Apr 2024 15:44:03 +0200 Subject: Adding upstream version 16.2. Signed-off-by: Daniel Baumann --- doc/src/sgml/ref/move.sgml | 124 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 doc/src/sgml/ref/move.sgml (limited to 'doc/src/sgml/ref/move.sgml') diff --git a/doc/src/sgml/ref/move.sgml b/doc/src/sgml/ref/move.sgml new file mode 100644 index 0000000..89b5a24 --- /dev/null +++ b/doc/src/sgml/ref/move.sgml @@ -0,0 +1,124 @@ + + + + + MOVE + + + + cursor + MOVE + + + + MOVE + 7 + SQL - Language Statements + + + + MOVE + position a cursor + + + + + +MOVE [ direction ] [ FROM | IN ] cursor_name + +where direction can be one of: + + NEXT + PRIOR + FIRST + LAST + ABSOLUTE count + RELATIVE count + count + ALL + FORWARD + FORWARD count + FORWARD ALL + BACKWARD + BACKWARD count + BACKWARD ALL + + + + + Description + + + MOVE repositions a cursor without retrieving any data. + MOVE works exactly like the FETCH + command, except it only positions the cursor and does not return rows. + + + + The parameters for the MOVE command are identical to + those of the FETCH command; refer to + + for details on syntax and usage. + + + + + Outputs + + + On successful completion, a MOVE command returns a command + tag of the form + +MOVE count + + The count is the number + of rows that a FETCH command with the same parameters + would have returned (possibly zero). + + + + + Examples + + +BEGIN WORK; +DECLARE liahona CURSOR FOR SELECT * FROM films; + +-- Skip the first 5 rows: +MOVE FORWARD 5 IN liahona; +MOVE 5 + +-- Fetch the 6th row from the cursor liahona: +FETCH 1 FROM liahona; + code | title | did | date_prod | kind | len +-------+--------+-----+------------+--------+------- + P_303 | 48 Hrs | 103 | 1982-10-22 | Action | 01:37 +(1 row) + +-- Close the cursor liahona and end the transaction: +CLOSE liahona; +COMMIT WORK; + + + + + Compatibility + + + There is no MOVE statement in the SQL standard. + + + + + See Also + + + + + + + + -- cgit v1.2.3