Browse Prior Art Database

New Options for FETCH in SQL

IP.com Disclosure Number: IPCOM000104977D
Original Publication Date: 1993-Jun-01
Included in the Prior Art Database: 2005-Mar-19
Document File: 2 page(s) / 72K

Publishing Venue

IBM

Related People

Boykin, JR: AUTHOR [+4]

Abstract

Disclosed is a method for extending SQL scrollable cursors to allow new options on FETCH, namely: REFRESH, BEFORE, CURRENT and AFTER.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 51% of the total text.

New Options for FETCH in SQL

      Disclosed is a method for extending SQL scrollable cursors to
allow new options on FETCH, namely: REFRESH, BEFORE, CURRENT and
AFTER.

      Standard SQL (as proposed by ISO) provides several options on
FETCH for random access to rows in a cursor, but additional options
are required.

      The FETCH statement positions a cursor on a row of a result
table and optionally assigns the values of that row to host
variables.

      Invocation - This statement can only be embedded in an
application program.

      This syntax shows only those keywords introduced by this
invention.  Descriptions of other orientation keywords (NEXT, PRIOR,
ABOLUTE, RELATIVE) and other syntactic items (fetch-clause and
cursor-name) have been published elsewhere.

+-------------------------------------------------------+
º >>--FETCH--.------------.---------------------------> º
º            º         (1)º                             º
º            '-REFRESH----'                             º
º                                                       º
º >--.---------------------.--cursor-name-------------> º
º    '-.-----------.--FROM-'                            º
º      º        (2)º                                    º
º      º-BEFORE----º                                    º
º      º        (2)º                                    º
º      º-AFTER-----º                                    º
º      º-CURRENT---º                                    º
º      '-...-------'                                    º
º                                                       º
º >--.--------------.-------------------------------->< º
º    '-fetch-clause-'                                   º
º                                                       º
º NOTES:                                                º
º (1)  If REFRESH is specified, fetch-clause must be    º
º      specified.                                       º
º                                                       º
º (2)  If BEF...