A fresh statistic can still come from a small sample. Compare rows with rows_sampled and see how a sample misjudges a rare value.
Masking Test Data With REGEXP_REPLACE in SQL Server 2025
Before a production copy reaches a developer, replace the real emails and phone numbers. Here is a small, checked way to do it with REGEXP_REPLACE.
Recent Rows Only: A Filtered Index for the Data Everyone Reads
A filtered index for recent rows is small and fast, but its date never moves by itself. Here is how to build it, test it and keep it fresh.
The money Data Type: Where Division and Rounding Go Wrong
Dividing money by money loses digits before any cast can save them. Here is the one-third demo, and how to find the leftover penny.
Building a Data Dictionary Query From Extended Properties
A plain join quietly hides every column nobody described. See the LEFT JOIN that keeps them, and turn the gaps into a to-do list.
Out-of-Row Storage for varchar(max): Keeping Data Pages Small
Turn on the out-of-row option and nothing happens until you rewrite the data. I measure pages and reads at each step so you can see the real trade.
FOR JSON Data Types: How bit, Dates and Money Come Out
Your API returns 1 and the client wanted true. Here is how FOR JSON picks a JSON type for bit, dates, decimal, money, binary and NULL, and how to fix it.







