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 ROUND CONCAT INTEGER , DOUBLE ...PREV , CHANGED , ...ISCLASS ACTIVE literal | Expression in parentheses Composition Selection Partition/order Recursion Group Structure creation Maximum/minimum Rounding String concatenation Type conversion Previous value, Change operators Signature matching Activity Constants | Prefix 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 |
LIKE | Comparison with a pattern | 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 |