Skip to main content

Arithmetic

Standard arithmetic with conventional precedence (*, /, % before +, -):
Unary plus and minus:

Bitwise Operators

String Concatenation

Use || to concatenate strings:

CASE

Searched form — each WHEN is a full condition:
Simple form — compares a single expression against values:

COALESCE

Returns the first non-NULL argument:

NULLIF

Returns NULL if both arguments are equal; otherwise returns the first argument:

ISNULL

Returns true if the argument is NULL, false otherwise. Equivalent to IS NULL in a predicate context:

Expression Aliases in ORDER BY

Aliases defined in SELECT can be used in ORDER BY:

Literals

Not Supported

  • CAST / CONVERT
  • DATE, TIME, TIMESTAMP literals
  • Scientific notation literals (e.g., 1e3)
  • Hex string literals (X'0A')
  • Bit string literals (B'0101')