Compare LEN vs DATALENGTH for trailing spaces, Unicode, UTF-8, NULL, and MAX values before safely resizing SQL Server string columns.
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 – Group by Rows and Columns using XML PATH – Efficient Concating Trick
A reader wanted students and courses grouped by course and instructor in a single row. Here is a simple concatenation trick with XML PATH that does it.
Where T-SQL Differs From the ANSI Standard
See where T-SQL differs from the ANSI standard in row limits, concatenation, NULL behavior, and practical query portability.
SQL SERVER – Check If String is a Palindrome in Using T-SQL Script – Reverse Function
A friend building a captcha had to skip words that read the same backward. Here is a T-SQL script with REVERSE to check if a string is a Palindrome.
TRIM Function in SQL Server: SQL in Sixty Seconds #040
The TRIM function removes spaces from the ends of a string, and SQL Server has had it since 2017. The tests here show which characters TRIM leaves behind, the LEADING and TRAILING keywords, and a WHERE clause that read 884 pages against 3.
Finding Duplicate Customers With T-SQL
Find duplicate customers with T-SQL by normalizing names, reviewing fuzzy matches, and merging records only after ownership is settled.


![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)



