1.1

Table Of Contents
In both of these clauses, ROW is synonymous with ROWS and FIRST is synonymous with NEXT.
In the OFFSET clause the integer-literal must be equal to 0 (the default if no OFFSET clause is provided), or
it must be a positive number. If the OFFSET is larger than the number of rows in the result set, then no rows are
returned.
In the FETCH FIRST clause , the integer-literal must be 1 or greater. You can omit the integer-literal entirely
to use the default value of 1. With the default value, SQLFire returns all rows in the result set (or only those
rows that are remaining, if the OFFSET clause is used).
Examples
SELECT * FROM T FETCH FIRST ROW ONLY
SELECT * FROM T ORDER BY I OFFSET 10 ROWS FETCH NEXT 10 ROWS
ONLY
SELECT * FROM T OFFSET 100 ROWS
ORDER BY Clause
Specify the order in which rows appear in the ResultSet.
Syntax
ORDER BY {
column-name
|
column-position
|
expression
}
[
ASC
|
DESC
]
[ ,
column-name
|
column-position
|
expression
[
ASC
|
DESC
] ] *
Description
The ORDER BY clause is an optional element of a SELECT statement. An ORDER BY clause allows you to
specify the order in which rows appear in the ResultSet.
Note: You cannot use the ORDER BY clause in a query used to create a view. See CREATE VIEW on
page 495.
SQLFire does not support using ORDER BY on a column of datatype BLOB, CLOB, or LONG VARCHAR
FOR BIT DATA.
521
SQL Language Reference