BlackWaspTM
SQL Server
SQL 2005+

Transact-SQL Operator Precedence

The thirty-seventh part of the SQL Server Programming Fundamentals tutorial brings together information from the previous articles. This article is a simple reference for the precedence of the Transact-SQL (T-SQL) operators.

Operator Precedence

Unary Bitwise Operators
~
Arithmetic Operators
* / %
Unary Arithmetic Operators
+ -
Arithmetic / Concatenation Operators
[+ arithmetic] [+ concatenation)] -
Bitwise Operators
& ^ |
Comparison Operators
=, >, <, >=, <=, <>, !=, !>, !<
Logical
NOT AND ALL ANY BETWEEN IN LIKE OR SOME
Assignment
=
29 September 2009