SQL Server emergency? Email pinal@sqlauthority.com with URGENT in the subject line.

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.

Continue Reading