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

Relational database
Microsoft's enterprise relational database engine.
A full-featured RDBMS with T-SQL, a cost-based optimizer, columnstore indexes, in-memory OLTP, Always On availability groups and deep tooling. Runs on Windows, Linux, containers and as Azure 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
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
Delete rows safely in SQL Server: choose between DELETE, TRUNCATE and DROP, archive rows with OUTPUT, and batch large deletes to limit locking and log growth.
#sql-server-2014
Create a SQL Server credential with T-SQL or Management Studio and use it for Agent proxies and backups to Azure Blob Storage or S3, then change or remove it safely.
Summarise data with COUNT, SUM, AVG, MIN and MAX, group and filter it with GROUP BY and HAVING, and add running totals with window aggregates.
SQL Server R Services is now Machine Learning Services. See what changed, how to enable it, how to run R or Python against a table, and when to avoid it.
Install a current SQL Server instance on Windows step by step, choose the right free edition, verify it, fix common setup errors, or run it in Docker.
#installation#sql-server-2014
Understand how SQL Server Reporting Services works, what a report is made of, and what its replacement by Power BI Report Server means for you.
Plan a SQL Server backup strategy around RPO and RTO: recovery models, full, differential and log backups, the backup chain, and how to verify backups restore.
#restore
Use SQL Server's everyday built-in functions for type conversion, NULL handling, logic and math, and avoid the truncation, rounding and conversion errors they cause.
#sql-server-2014