This shortest code puzzle asks for 1000000000 without writing that literal or using arithmetic operators. The earlier zero puzzle brought roughly 700 valid answers.
SQL SERVER – Select Unique Data From a Column Exist in Two Different Table
A reader wanted to Select Unique Data from a column in two tables, keeping only values found in just one of them. Here is the query that does it.
SQL SERVER – Puzzle – Write a Shortest Code to Produce Zero
This Zero puzzle asks for the shortest SQL Server code within three restrictions. I want the exact code and character count.
SQL SERVER – Puzzle – Incorrect Results with Decimal
A new puzzle: a simple table with price and discount returns Incorrect Results with DECIMAL. Can you work out why without running the code in SSMS?
SQL SERVER – Why We have Audit Trace in DATA Folder? What are These Files?
The DATA drive filled up with thousands of audittrace .trc files. Here is why SQL Server writes audit trace files there and how to stop them.
SQL SERVER – Puzzle – Why does sp_spaceused Show No Values?
Why does sp_spaceused show no values for a table that clearly has rows? It stumped me for 10 minutes. Here is the puzzle, try it before reading on.
SQL SERVER Puzzle – Conversion with Date Data Types
Converting values with CAST can round in ways you don’t expect. A puzzle on Date Data Types: guess the output of each query before you run it.





