Try this simple puzzle with UNION and ORDER BY. Guess what each of the three queries returns, and see why one of them fails with Msg 108 and Msg 104.
SQL SERVER – Relationship with Parallelism with Locks and Query Wait – Question for You
In server properties, Locks and Query Wait sit under the Parallelism section next to MAXDOP and cost threshold. I do not know why. Do you?
Querying Pattern Ranges With LIKE: A Wildcard Puzzle With the Answer
Querying pattern ranges with LIKE takes the % wildcard and a range in square brackets. This puzzle asks which of six queries finds every first name that starts with a letter from A to M and ends with z. The answer is tested on a small Members table, along with the = trap, the NOT range and a collation trap. Every result comes from SQL Server 2025.
SQL SERVER- Solution – SQL Puzzle of SET ANSI_NULL
The solution to my Puzzle of SET ANSI_NULL: why IN returns a row but NOT IN returns nothing when the list has a NULL, and how SET ANSI_NULLS ON explains it.
SQL SERVER – Solution to Puzzle – REPLICATE over 8000 Characters
Here is the answer to my puzzle on REPLICATE over 8000 characters, with a quick recap of the script and why the lengths come out the way they do.
SQL SERVER – How to use xp_sscanf in Real World Scenario?
I came across the extended stored procedure xp_sscanf and could not find a real world use for it. Here is how it works. Can you tell me where to use it?
SQL SERVER – Puzzle and Answer – REPLICATE over 8000 Characters
A quick Monday puzzle: what happens when you REPLICATE over 8000 characters into a VARCHAR(MAX) variable? Guess the lengths before you run it.



![A table of 12 first names with the 6 matches marked Yes, beside the pattern LIKE '[a-m]%z' split into three parts: one letter from a to m, any run of characters, and a final z](https://blog.sqlauthority.com/wp-content/uploads/2026/10/querying-pattern-ranges-with-like-a-wildcard-puzzle-with-the-answer-cover.webp)

