Skip to main content

Operator Order of Precedence

The below table shows order of operations for all operators, from highest to lowest precedence. This generally matches Postgres's operator precedence, albeit with a restricted set of operators.

OperatorAssociativityDescription
()Parentheses
::LeftType Cast
[]LeftArray Index
.LeftMember Access
-RightNegation
*, /, %LeftMultiplication, Division, Modulo
+, -LeftAddition, Subtraction
ISType Comparison
INSet Membership
BETWEENRange Comparison
LIKE, ILIKEPattern Matching
>, <, >=, <=Comparison
==, !=, =, :=RightEqual, Not Equal, SQL Assignment, Procedure Assignment
NOTRightLogical NOT
ANDLeftLogical AND
ORLeftLogical OR