Skip to main content

Operators

This table shows the operators associativity, starting from highest to lowest:

OperatorAssociativityComments
.leftField access
::leftInfix cast
[ index ]leftCollection element
+, -rightUnary plus, minus
*, /, %, ||leftarithmetic
+, -leftarithmetic
BETWEEN, IN, LIKE, SIMILAR, OVERLAPS, CONTAINSN/A
<, >, =, <=, >=, <>, !=, <=>leftcomparisons
IS NULL, IS FALSE, IS TRUE, IS UNKNOWN, IS NOT NULL, IS NOT TRUE, IS NOT FALSE, IS NOT UNKNOWNunary
NOTrightBoolean
ANDleftBoolean
ORleftBoolean

Arithmetic operations combining signed and unsigned values will produce a result with the wider type; if both types have the same width, the result is unsigned;