Find foreign keys without indexes, inspect parent-delete plans, and choose leading child-table keys that support relationship checks.
Point-in-Time Restore: Getting Back Rows Deleted by Accident
Plan a point-in-time restore after an accidental DELETE, preserve the log chain, recover a separate copy, and return reviewed rows.
Edge Constraints: Controlling Which Nodes a Graph Edge Connects
An edge table with no rules accepts nonsense links. Add an edge constraint, watch the bad edge fail, and see what the constraint still does not check.
Commenting Out Code: Testing Safely in SSMS
Commenting Out Code is the quickest way to switch off part of a script while you test the rest. This post covers the SSMS shortcuts, testing one WHERE filter at a time, the trap of GO inside a block comment, and a safety note to leave above a DELETE.
Walking Foreign Key Chains to Find a Safe Delete Order
Map foreign key chains from a parent table with a recursive catalog query, then list deepest children first and flag cascade rules.
MERGE Statement Quiz: What If Two Source Rows Match One Target?
This MERGE Statement Quiz asks what happens when two source rows match one target row. The answer is error 8672, and the whole statement fails. A tested script shows the error, the fix with ROW_NUMBER and the same change written as UPDATE plus INSERT.
OUTPUT Clause Quiz: What Do inserted and deleted Hold?
This OUTPUT Clause Quiz raises a price from 10 to 12 and asks which two values come back. The answer is 10 and 12, because deleted holds the old row and inserted the new one. A tested script proves it and shows OUTPUT with INSERT, DELETE and an audit table.







