A trigger cannot read your statement, but it can count the rows that vanish. Here is a guard that stops a runaway delete, and where it falls short.
A Page of Rows and the Grand Total Count in One Query
One query can give a grid its ten rows and the total for the label. Here is how, plus the empty page trap that catches almost everyone.
SQL SERVER – Detecting Database Case Sensitive Property using fn_helpcollations()
Is your database Case Sensitive? Find its collation, then look it up in fn_helpcollations() and read the description. A quick answer from my Office Hours.
Temporal Tables: Keeping History Without a Trigger
Use temporal tables to retain earlier row versions, query a past state, and plan history storage without confusing version history with user auditing.
Growing varchar Updates: How Longer Values Split Pages
A varchar column costs almost nothing while it is empty and a lot once people fill it in. Here is the page count before and after, and what a rebuild recovers.
How to Read a SQL Server Execution Plan
An execution plan is SQL Server showing its working. Read it inside out, learn the six operators you actually meet, ignore the cost percentages, and compare estimated rows with actual rows instead.
FULL JOIN: Preserve Unmatched Rows on Both Sides
FULL JOIN preserves both source sides. Keep identifiers visible while reviewing ordinary equality, unmatched rows and later filters.







