honza.mf (5/25/2010)
You are right, it works.Are you really doing it? I must say, sometimes I change collation from case-insensitive to case-sensitive, but I have never used BIN type collation yet.
Well, as I said, I just learned how LIKE behaves with Czech_CI_AS collation, so no, I haven't used it yet. However, I use Czech_BIN when I need to order Czech strings (with Czech collation) in order of English alphabet:
CREATE TABLE #t ([string] VARCHAR (5));
INSERT INTO #t ([string])
VALUES ('ACH');
INSERT INTO #t ([string])
VALUES ('ACY');
INSERT INTO #t ([string])
VALUES ('AHHC');
-- Output: 1. ACY, 2. AHHC, 3. ACH
SELECT
Row_Number() OVER (ORDER BY [string]), [string]
FROM
#t;
-- Output: 1. ACH, 2. ACY, 3. AHHC
SELECT
Row_Number() OVER (ORDER BY [string] COLLATE Czech_BIN), [string]
FROM
#t;
DROP TABLE #t;
A note for people not familiar with Czech language: in the Czech alphabet, a letter "CH" is just between letters "H" and "I".