Typically, SQL Server is not case-sensitive. But there is the ways if you want to search with exact case. This is one of them.

Code Snippet

COLLATE SQL_Latin1_General_CP1_CS_AS 

Sample Usage

SELECT UserName FROM Users WHERE 
UserName COLLATE SQL_Latin1_General_CP1_CS_AS = 'User 1'

Note

Above method will change the column collate for temporary use.




author's photo

Author : Blue Cloud

Just a normal software developer who love to write code. Developing professional software since 1999. After working in the software industry for many years, I've started my own website to share knowledges and experiences.

COMMENTS
blog comments powered by Disqus