sys.dm_tran_active_transactions and sys.dm_tran_current_transaction look alike, but one lists active transactions for the instance, the other only your session.
SQL SERVER – Mirrored Backup and Restore and Split File Backup
From a real project: conventional backup and restore, split file backup when a disk runs short of space, mirror file backup, and the FORMAT clause.
EXCEPT: Compare Distinct Sets Including NULL
EXCEPT returns distinct left-side rows absent on the right. Compare direction, duplicates and NULL equality using complete small result sets.
FIFO Inventory Costing in T-SQL: Matching Sales to Purchase Lots
Which purchase lot paid for which sale? Two running totals and one join answer it, with no cursor and no loop.







