EasyManua.ls Logo

Sybase Adaptive Server Anywhere - Search Conditions

Sybase Adaptive Server Anywhere
1182 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 6 SQL Language Elements
239
Search conditions
To specify a search condition for a WHERE clause, a HAVING clause, a
CHECK clause, a JOIN clause, or an IF expression.
search condition:
expression
compare
expression
|
expression
compare
{ [ ANY | SOME ] | ALL }(
subquery
)
|
expression
IS [ NOT ] NULL
|
expression
[ NOT ] BETWEEN
expression
AND
expression
|
expression
[ NOT ] LIKE
expression
[ ESCAPE
expression
]
|
expression
[ NOT ] IN ( {
expression
|
subquery
|
value-expr1
,
value-expr2
[,
value-expr3
] ...} )
| EXISTS (
subquery
)
| NOT
condition
|
condition
AND
condition
|
condition
OR
condition
| (
condition
)
| (
condition
,
estimate
)
|
condition
IS [ NOT ] { TRUE | FALSE | UNKNOWN }
compare
:
= | > | < | >= | <= | <> | != | !< | !>
Anywhere.
Must be connected to the database.
None.
"Expressions" on page 230
Conditions are used to choose a subset of the rows from a table, or in a
control statement such as an IF statement to determine control of flow.
SQL conditions do not follow boolean logic, where conditions are either true
or false. In SQL, 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. For tables
showing how logical operators combine in three-valued logic, see the section
"Three-valued logic" on page 245.
Rows satisfy a search condition if and only if the result of the condition is
TRUE. Rows for which the condition is UNKNOWN do not satisfy the
search condition. For more information about NULL, see "NULL value" on
page 260.
Subqueries form an important class of expression that is used in many search
conditions. For information about using subqueries in search conditions, see
"Subqueries in search conditions" on page 240.
Function
Syntax
Parameters
Usage
Authorization
Side effects
See also
Description

Table of Contents

Related product manuals