How to Perform Calculations Using SELECT Statement in T-SQL
Do arithmetic in a T-SQL SELECT and avoid the usual traps: integer division, NULL results, divide-by-zero errors, overflow, rounding and float inaccuracy.
#t-sql
Tanishk · 7 min
Topic
Do arithmetic in a T-SQL SELECT and avoid the usual traps: integer division, NULL results, divide-by-zero errors, overflow, rounding and float inaccuracy.
#t-sql
Sort SQL Server results by one or more columns, control where NULLs land, page with OFFSET and FETCH, and fix the common ORDER BY errors.
#t-sql
Turn rows into columns with the T-SQL PIVOT operator, handle NULLs and unknown column lists, and know when conditional aggregation is the better choice.
#t-sql