Skip to main content

Operators and expressions

Comparisons, conditions, CASE, CAST and comments.

NameWhat it does
OperatorsComparison, logical, arithmetic and concatenation operators, and their precedence.
LIKEMatch text against a pattern with % and _ wildcards.
INTest whether a value is one of a list, or among a subquery's values.
BETWEENTest whether a value lies in a range, ends included.
IS NULLTest whether a value is missing; IS TRUE and IS FALSE test booleans.
EXISTSTest whether a subquery returns any row.
CASEChoose a value by testing conditions in order.
CASTConvert a value to another type.
CommentsText in a statement that the engine ignores.