1.0

Table Of Contents
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.
column-name
Refers to the names visible from the SelectItems in the underlying query of the SELECT statement. The
column-Name that you specify in the ORDER BY clause does not need to be the SELECT list.
ColumnPosition
An integer that identies the number of the column in the SelectItems in the underlying query of the SELECT
statement. ColumnPosition must be greater than 0 and not greater than the number of columns in the result table.
In other words, if you want to order by a column, that column must be specied in the SELECT list.
Expression
A sort key expression, such as numeric, string, and datetime expressions. Expression can also be a row value
expression such as a scalar subquery or case expression.
ASC
Species that the results should be returned in ascending order. If the order is not specied, ASC is the default.
DESC
Species that the results should be returned in descending order.
Note: If SELECT DISTINCT is specied or if the SELECT statement contains a GROUP BY clause,
the ORDER BY columns must be in the SELECT list.
Note: An ORDER BY clause prevents a SELECT statement from being an updatable cursor.
WHERE Clause
Select rows based on a boolean expression.
Syntax
WHERE Boolean Expressions
Description
A WHERE clause is an optional part of a SelectExpression , DELETE statement, or UPDATE statement . The
WHERE clause lets you select rows based on a boolean expression. Only rows for which the expression evaluates
to TRUE are returned in the result, or, in the case of a DELETE statement, deleted, or, in the case of an UPDATE
statement, updated.
Most of the General expressions can result in a boolean value. In addition, there are the more common Boolean
Expressions
Example
-- find the flights where no business-class seats have
-- been booked
vFabric SQLFire User's Guide492
vFabric SQLFire Reference