Expressions in the WHERE clause

An expression in a WHERE clause names or specifies something 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, you need to 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.

Related concepts
Use subqueries
Related reference
Define complex search conditions
Expressions