May 2006
Intermediate to advanced
536 pages
15h 13m
English
This section describes how implicit conversions work in T-SQL, including the way SQL Server evaluates scalar and filter expressions.
T-SQL expressions have a result datatype, which is determined by the datatype with the highest precedence among the participating operands in the expression. You can find the datatype precedence in Books Online under precedence [SQL Server] / data types / Datatype Precedence (Transact-SQL).
Expression evaluation rules might be a bit confusing in some cases if you’re not aware of this behavior. For example, if you apply an AVG aggregate function to an integer column, the result datatype of the expression will be an integer. So, the average of the integers {2, 3} will be the integer ...
Read now
Unlock full access