REGEXP_COUNT counts how many times a pattern matches inside a text value, a job that used to need LEN and REPLACE tricks. This post tests it on SQL Server 2025: start position, flags, NULL and empty text, a data quality check, and where the old trick still fits.
SQL SERVER – DELETE, TRUNCATE and RESEED Identity
How does an identity column behave after DELETE, TRUNCATE and RESEED Identity? A short T-SQL script with seed 11 shows what value comes next in each case.
SQL SERVER – Reseting Identity Values for All Tables
A DBA deleted all data in a loop and wondered why identity did not restart. Our long chat on resetting identity values for all tables, and why TRUNCATE helps.
SQL SERVER – Color Coding SQL Server Management Studio Status Bar – SQL in Sixty Seconds #023 – Video
Color code the SQL Server Management Studio status bar so you always know which server you are on before you run a script. A quick video.
Non-Updating Updates: Skipping Rows That Would Not Change
An UPDATE that writes the same value still marks the row as modified. I show how IS DISTINCT FROM skips those rows and keeps NULL changes.
Unique Pairs in Either Order: Blocking A-B When B-A Exists
A plain unique index treats (1, 2) and (2, 1) as different rows. Two computed columns and one index fix that, and I test the awkward cases.
Is This Instance Patched? Reading ProductUpdateLevel and Build
An update label is one clue, the build number is the identity. I show how to read both, compare builds safely, and avoid the NULL typo trap.







