It depends on your mapping, which would seem to be case insensitive. For example, standard sorting Latin1_General_CI_AS, which CImeans case insensitive. You can force another combination for another comparison:
select *
from users
where name = @name
and pass COLLATE Latin1_General_CS_AS = @pass COLLATE Latin1_General_CS_AS
By the way, you should not store passwords in your database - you should salt and hash them.
source
share