SQL Server

SQL Server Management Studio 18.2

One of the biggest downsides of using SQL Server Management Studio as an interactive query tool is the limit on text/grid output. SSMS 18.2 fixes that!

Find integer columns to downsize

In this tip, you'll see the metadata queries that will make it possible to discover which integer-based columns could be made smaller (without any loss of data).

Simplify date period calculations

See how you can use new functions like DATEFROMPARTS to simplify otherwise really cryptic methods to obtain key dates (like the first day of the current month).

CASE expression overview

This tip shows how powerful the CASE expression is, and some of the nuances in its behavior.

Table variable deferred compilation

I talk about the pros and cons of letting SQL Server wait to get a more accurate cardinality estimate from a table variable.

MERGE with caution

This tip was refreshed with status updates for some of the critical bugs discovered in MERGE over the years.

UNION and data type mismatches

Estimated data size as a result of implicit conversions can make a huge difference in the execution plan.