Expressions in the WHERE clause

 

An expression in a WHERE clause names or specifies something that you want to compare to something else.

The expressions you specify can be:

A search condition can specify many predicates separated by AND and OR. No matter how complex the search condition, it supplies a TRUE or FALSE value when evaluated against a row. There is also an unknown truth value, which is effectively false. That is, if the value of a row is null, this null value is not returned as a result of a search because it is not less than, equal to, or greater than the value specified in the search condition.

To fully understand the WHERE clause, know the order SQL evaluates search conditions and predicates, and compares the values of expressions. This topic is discussed in the SQL Reference topic collection.

 

Parent topic:

Specifying a search condition using the WHERE clause

 

Related concepts


Using subqueries

 

Related reference


Defining complex search conditions
Expressions