1

Whether Collate Latin1_General_CS_AS and Collate utf8_bin are same, well they are different the former is for Latin1 charset and the latter is for utf8 charset but i wanted to know whether both of will do case sensitive and Accent sensitive match.

Actually just now i have migrated my database from sql server2000 to MySQL 5.2 and i have a password field which i want to compare with case sensitive and Accent sensitive in sql server that Collate Latin1_General_CS_AS is working fine but i want to know Collate utf8_bin is the replacement for that in MySQL or there are some other better ways to achieve the same.

1 Answer 1

2

I don't know SQL server and the collation you mention, but utf8_bin, being a binary collation, is indeed case and accent sensitive.

You don't necessarily need to have the entire database in that collation though - binary collations are not great at sorting. You can force a binary comparison in a non-binary collation (like utf8_general_ci) using the COLLATE keyword:

SELECT column FROM table WHERE password COLLATE utf8_bin = "abcäöü"; 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.