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.
Resource Database Quiz: Where Do the System Objects Live?
This Resource Database Quiz asks where SQL Server stores the definition of sys.objects and whether BACKUP DATABASE can protect it. The answer is the hidden Resource database. A tested script shows its version, its date and the system objects every database sees.
Create Constraints Quiz: What Does WITH NOCHECK Leave Behind?
This Create Constraints Quiz adds a CHECK constraint WITH NOCHECK to a table that already holds a bad row. The bad row stays, and the constraint is marked not trusted. A tested script proves it, shows what trust changes for the optimizer and lists four ways to create a constraint.
CHECKPOINT Behavior Quiz: What Lets the Log Be Reused?
This CHECKPOINT Behavior Quiz asks what lets SQL Server reuse transaction log space under the SIMPLE and FULL recovery models. The answers differ, and a tested script shows both. It also shows how one open transaction keeps the log from being reused.
CHAR, VARCHAR, NVARCHAR and VARCHAR(MAX) Quiz: How Many Bytes?
This CHAR, VARCHAR, NVARCHAR and VARCHAR(MAX) Quiz stores the text abc in three columns and asks how many bytes each one uses. The answer is 10, 3 and 6. A tested script proves it and shows the trailing space trap, the question mark problem and the 8,000 byte limit.
Stored Procedure Recompile Quiz: What Forces a New Plan?
This Stored Procedure Recompile Quiz asks which action makes SQL Server build a new plan for a procedure. The answer is a new index on a table it reads. A tested script uses plan counters to show what reuses the plan and what rebuilds it.
Table Variables vs Temporary Tables Quiz: Which Survives a Rollback?
This Table Variables vs Temporary Tables Quiz inserts one row into each, then rolls back. The table variable keeps its row and the temporary table loses it. A tested script proves it, and two more scripts show a rollback-proof log and the statistics gap.







