TIL: How to do a case-sensitive search in SQL Server

from blog Just Some Code, | ↗ original
Do you use LOWER or UPPER to do case-sensitive searches? Let’s see how to write a case-sensitive search in SQL Server. To write a case-sensitive search in SQL Server, don’t use UPPER or LOWER functions around the column to filter. Instead, use the COLLATE keyword with a case-sensitive collation followed by the comparison. Naive case sensitive...