My favorite icebreaker puzzle: a strange behavior with an extra comma in CREATE TABLE statement. Why does SQL Server accept it for temp and regular tables?
SQL SERVER – Puzzle – Solution – Why Does UNION ALL Work but UNION Produces Error?
Here is the answer to my puzzle: why does UNION ALL work but UNION produces an error with a TEXT column? It comes down to how UNION removes duplicates.
SQL SERVER – Puzzle – Why Does UNION ALL Work but UNION Produces Error?
A puzzle with TEXT columns: UNION ALL works fine, but UNION produces error. Can you tell why? The hint is in how UNION removes duplicates.
SQL SERVER – Puzzle – Brain Teaser – Changing Data Type is Changing the Default Value
A brain teaser on data types: changing data type is changing the default value of a column. Can you name the original and new datatype and default value?
SQL SERVER – Puzzle – Adding Two Dates Resulting Strange Results
I typed a plus instead of a comma and got strange results when adding two dates in SQL Server. Can you explain the output of this little puzzle?
SQL SERVER – Puzzle – Shortest Code to Produce the Number 1000000000 (One Billion)
After 700 answers to my zero puzzle, here is the next one: write the shortest code to produce 1000000000 without typing it or using arithmetic operators.
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.




