Skip to main content

Operator Order of Precedence

The below table shows order of operations for all operators, from highest to lowest precedence.

OperatorAssociativityDescription
()Parentheses
.LeftMember Access
[]LeftArray Index
-RightNegation
COLLATELeftCollation
*, /, %LeftMultiplication, Division, Modulo
+, -LeftAddition, Subtraction
any other expressionLeftany other expression
INSet Membership
LIKE, ILIKEPattern Matching
BETWEENRange Comparison
==, !=, =, >, <, >=, <=Comparison
ISType Comparison
NOTRightLogical NOT
ANDLeftLogical AND
ORLeftLogical OR