Skip to content

Latest commit

 

History

History
42 lines (34 loc) · 2.02 KB

operator-precedence-and-associativity.md

File metadata and controls

42 lines (34 loc) · 2.02 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic helpviewer_keywords
Operator Precedence and Associativity
Operator Precedence and Associativity
chugugrace
chugu
03/01/2017
sql
integration-services
conceptual
associativity [Integration Services]
precedence [Integration Services]

Operator Precedence and Associativity

[!INCLUDEsqlserver-ssis]

Each operator in the set of operators that the expression evaluator supports has a designated precedence in the precedence hierarchy and includes a direction in which it is evaluated. The direction of evaluation for an operator is operator associativity. Operators with higher precedence are evaluated before operators with lower precedence. If a complex expression has multiple operators, operator precedence determines the order in which the operations are performed. The order of execution can significantly affect the resulting value. Some operators have equal precedence. If an expression contains multiple operators of equal precedence, the operators are evaluated directionally, from left to right or right to left.

The following table lists the precedence of operators in order of high to low. Operators at the same level have equal precedence.

Operator symbol Type of Operation Associativity
( ) Expression Left to right
-, !, ~ Unary Right to left
casts Unary Right to left
*, / ,% Multiplicative Left to right
+, - Additive Left to right
<, >, <=, >= Relational Left to right
==, != Equality Left to right
& Bitwise AND Left to right
^ Bitwise exclusive OR Left to right
| Bitwise inclusive OR Left to right
&& Logical AND Left to right
|| Logical OR Left to right
? : Conditional expression Right to left

See Also

Operators (SSIS Expression)