A state machine in T-SQL keeps the allowed status changes in a table and rejects every other change. This post builds one for orders with a transitions table and a trigger, then tests a bad jump, several rows in one UPDATE, new orders, a transaction and a new rule. Every result comes from SQL Server 2025.
WAITFOR DELAY in SQL Server: SQL in Sixty Seconds #055
WAITFOR DELAY pauses a SQL Server batch for a fixed amount of time. This episode shows the command, and the tests here measure how long it really waits, what it does to locks and workers, and where it stops being the right tool.
INNER JOIN vs JOIN in SQL Server: Is There Any Difference?
INNER JOIN vs JOIN is a question about one optional keyword. The tests here show identical results, identical query and plan hashes, the one place where INNER is required, and the LEFT JOIN trap that really does change the rows.
Change Data Capture Cost: Log, Storage and Cleanup Measured
Change Data Capture cost shows up in places a quick setup never checks. On SQL Server 2025, the same update wrote three times the log with CDC on, the log waited for the capture, and the change table grew to almost four times the table. Here is every number and the script that produced it.
Comparing Two Copies of a Table With CHECKSUM_AGG and HASHBYTES
Use CHECKSUM_AGG for a quick table-copy signal, then compare canonical HASHBYTES values and key ranges to locate real data differences.
What to Look For in a SQL Client Tool
Choose a SQL client tool by testing result handling, execution plans, transactions, and connection identity before trusting it with real work.
What Is a Trigger in SQL Server?
A trigger in SQL Server runs because something else happened, and you never call it. The inserted and deleted tables, why it fires once per statement and not once per row, and when to reach for something else.







