FETCHKEYS
The FETCHKEYS command works the same as the FETCH command except that
it retrieves key values instead of the data. This includes ROWIDs and
search items and keywords for a particular index.
Syntax
FETCHKEYS [<n | ALL>] [ON [CURSOR] cursor] [WITH options]
FETCHKEYS
Required.
n | ALL
Optional.
n is an integer representing the number of rowids to fetch. In this case,
FETCHKEYS can be called repeatedly until all rowids have been retrieved.
ALL will retrieve all qualified rowids.
If n and ALL are omitted, rowids will be retrieved one at a time. FETCHKEYS
can be called repeatedly until all rowids have been retrieved.
ON CURSOR cursor
Optional. Specify the cursor on which to perform the fetch. cursor is
the integer cursor number generated when the cursor was opened. The CURSOR
keyword is optional. The ON keyword is required if the cursor is being
specified.
WITH options
Optional. A comma separated list of options to apply to this command.
Options
REWIND or R
NEXT or N
PREV or P
SKIPNEXT
SKIPPREV
ODXSI
KEY
RECNO
ROWID
PROXIMITY
KEYWD
KWCOUNT
KWPCOUNT
CHAR
C_STRING
BIG_ENDIAN
LITTLE_ENDIAN
SORTBY
TIMEOUT
Example
>set autofetch off
>qualify customers where state='co'
38 CUSTOMERS records qualify
>qualify customers where company='and systems'
3 CUSTOMERS records qualify
>fetchkeys all
CUSTOMER_NO
--------------
1
343
867
3 rows returned
>
Top
|