Hi
Today i was working on one of my personal project, there was requirement to filter the field from database on basis of case sensitive. For example user has given password “TEST” then database should not accept “Test” as input password.
Sqlserver default it will be in-case sensitive. We have to make it case sensitive like this
We can do using so many approach like this
First Method
Select EmpName from tblEmp where BINARY_CHECKSUM(EmpName)=BINARY_CHECKSUM(‘Hello’)
Second Method
Select EmpName from tblEmp where EmpName=’Hello’ COLLATE SQL_Latin1_General_CP1_CS_AS
Select EmpName from tblEmp where EmpName COLLATE Latin1_General_CS_AS=’Hello’