Skip to content

Latest commit

 

History

History
42 lines (34 loc) · 2.03 KB

File metadata and controls

42 lines (34 loc) · 2.03 KB
title Operator Precedence and Associativity
description Operator Precedence and Associativity
author chugugrace
ms.author chugu
ms.date 03/01/2017
ms.service sql
ms.subservice integration-services
ms.topic concept-article
helpviewer_keywords
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)