SQL Server queries case sensitivity

case-sensitive, sql, sql-server, sql-server-ce

Solution

You can make your query case sensitive by making use of the `COLLATE` keyword.

SELECT A 
FROM MyTbl 
WHERE A COLLATE Latin1_General_CS_AS = 'ABCdef'

Problem

I have this database: ``` abcDEF ABCdef abcdef ``` if I write: `select * from MyTbl where A='ABCdef'` how to get: `ABCdef` and how to get: ``` abcDEF ABCdef abcdef ``` Thanks in advance forgot to write - sqlCE

Original source