Store survey answers as typed rows instead of one column per question. Then break the design on purpose to see what it blocks and what it cannot.
Counting Ranked-Choice Votes With a Loop and a Table
Four people rank three topics and nobody has a majority. Here is a small loop that eliminates the weakest topic, moves its ballots and logs every round.
Get Partition Info in SQL Server: Rows and Boundaries
To get partition info in SQL Server, join sys.partitions to the partition scheme, function and filegroup views. This post builds a small partitioned table, lists every partition with its boundaries, row count and filegroup, and shows how to find the partition for a value. It also lists the tables that have more than one partition.
A Schedule Table That Repeats Every Other Week
Build an every other week schedule in T-SQL, skip holiday dates, find the next occurrence, and check rota weeks from one anchor.
Disk Space Needed to Build a Clustered Index on a Big Table
A clustered index build holds the old table and the new index at the same time. Here is a small demo of that peak, and what to check first.
Renaming a Table With Almost No Downtime Using sp_rename
A rename swaps names in a blink, yet the foreign key and permissions stay with the old table. Here is a short demo and a safer swap.
Partition Elimination: Proving a Query Reads Only What It Needs
Prove partition elimination with the actual plan, test date predicates, and use $PARTITION to check which slice SQL Server targets.







