Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » UltraLite - Database Management and Reference » UltraLite SQL Elements Reference » Expressions in UltraLite

Input parameters Next Page

Search conditions in UltraLite

Specifies a search condition for a WHERE clause, a HAVING clause, an ON phrase in a join, or an IF expression. A search condition is also called a predicate.


expression compare expression
| expression IS [ NOT ] { NULL | TRUE | FALSE | UNKNOWN }
| expression [ NOT ] BETWEEN expression AND expression
| expression [ NOT ] IN ( expression, ... )
| expression [ NOT ] IN ( subquery )
| expression [ NOT ] { ANY | ALL } ( subquery )
| expression [ NOT ] EXISTS ( subquery )
| NOT search-condition
| search-condition AND search-condition
| search-condition OR search-condition
| ( search-condition )


= | > | < | >= | <= | <> | != | !< | !>


In UltraLite, search conditions can appear in the:

Search conditions can be used to choose a subset of the rows from a table in a FROM clause in a SELECT statement, or in expressions such as an IF or CASE to select specific values. In UltraLite, every condition evaluates as one of TRUE, FALSE, or UNKNOWN. This is called three-valued logic. The result of a comparison is UNKNOWN if either value being compared is the NULL value. Search conditions are satisfied only if the result of the condition is TRUE.

The different types of search conditions supported by UltraLite include:

These conditions are discussed in separate sections that follow.


Subqueries form an important class of expression that is used in many search conditions.

See also

Comparison operators
Logical operators
ALL conditions
ANY conditions
BETWEEN conditions
EXISTS conditions
IN conditions