Case Sensitive String Comparison in SQL Server
SQL Server is installed with default “Collation” if it is not specified. You can check out your Database Server default “Collation” using this query.
SELECT SERVERPROPERTY ('Collation');
“SQL_Latin1_General_CP1_CI_AS” is the default “Collation” of SQL Server and this doesn’t support case sensitive String comparison. However, if you want to make case sensitive String comparison, you have two options left. Either alter the Column “Collation” to “SQL_Latin1_General_CP1_CS_AS” or add “Collate SQL_Latin1_General_CP1_CS_AS” at the end of query to perform case sensitive String comparison.
SELECT * FROM t_User WHERE User_Name = ‘User Name’ AND User_Password =’User Password’ Collate SQL_Latin1_General_CP1_CS_AS;
A Rahim Khan