A code review puzzle: 15 fields joined with ISNULL on every column. Can you concatenate columns with NULL values in a simpler way using SQL Server functions?
SQL SERVER – Puzzle with Year Function
After my MONTH() contest, here is a puzzle with YEAR function: what do MONTH and YEAR return for the date 0001-1-1, and why? Take a guess first.
SQL SERVER – Trivia – Days in a Year
A friend was asked in an interview how to find the days in a year efficiently. Here are the T-SQL methods I tried, plus a small quiz for you.
SQL SERVER – Quiz with DATEADD Function – SQL Puzzle
The DATEADD function returns the last day of the month when the day does not exist, so one month after January 31 is February 28. This post keeps the quiz, runs every query on SQL Server 2025 and explains the month rule and the Msg 517 overflow with the real results.
SQL SERVER – Puzzle – Why Divide by Zero Error
Why does SELECT 10000/(17/17/17) return a divide by zero error? A new puzzle, similar to my decimal rounding one but with a different approach.
SQL SERVER – Puzzle – Why Decimal is Rounded Up?
Why decimal is rounded up in one script and not in the other when both divide 10000 by 17? Try this holiday puzzle before you read the comments.
SQL SERVER – Contest Winner – What Next on SQL in Sixty Seconds – Poll Result
The poll for the next SQL in Sixty Seconds videos is closed, and most readers want performance tuning. Here are the results and the contest winner.






