Operator priority
When evaluating an expression, operators are evaluated in a specific order depending on operator priority. The higher the operator’s priority, the earlier it will be executed. The table below lists the priorities of all operators in descending order.
Operator | Description | Type |
---|---|---|
(expression) JOIN CASE , MULTI , OVERRIDE , EXCLUSIVE , IF ... THEN PARTITION RECURSION GROUP STRUCT MAX /MIN CONCAT INTEGER , DOUBLE ...PREV , CHANGED , ...CLASS ACTIVE literal | Expression in parentheses Composition Selection Partition/order Recursion Group Structure creation Maximum/minimum String concatenation Type conversion Property signature Activity Constants | Prefix Prefix Prefix Prefix Prefix Prefix Prefix Prefix Prefix Prefix Prefix Prefix |
[ ] IS AS | Structure element access Classification Classification | Postfix Postfix Postfix |
- | Unary minus | Prefix |
* / | Multiplication Division | Binary Binary |
+ - | Addition Subtraction | Binary Binary |
(+) (-) | Addition with NULL valuesSubtraction with NULL values | Binary Binary |
< <= > >= | Less Less or equal Greater Greater or equal | Binary Binary Binary Binary |
== != | Equal Not equal | Binary Binary |
NOT | Logical negation | Prefix |
AND | Logical AND | Binary |
XOR | Logical exclusive OR | Binary |
OR | Logical OR | Binary |
IF | Condition | Binary |