Case Sensitive Comparison in SQL Server
Posted by Virendra Dugar on July 24, 2009
SQL Server performs the string comparison irrespective of the case. For eg. “VIRENDRA” and ‘virendra’ are equal when we do comparison in SQL Server.
I found an article which gives complete detail about case sensitive string comparison.
Below are the techniques to do case sensitive comparison
- Converting data to binary type before comparison.
- Using the COLLATE clause to dictate the case sensitiveness of the query.
- Using BINARY_CHECKSUM function.
- Changing the collation of the column permanently, so that all comparisons are case sensitive by default.
- Using computed columns.
Check the original article for more details.