mysql,重音不敏感

时间:2017-03-29 06:49:35

标签: mysql case-sensitive case-insensitive

根据:https://dev.mysql.com/doc/refman/5.6/en/charset-collation-names.html

"latin1_general_ci is explicitly case insensitive and implicitly accent insensitive"

测试1

SET @a =_latin1'é' COLLATE latin1_general_ci;
SET @b =_latin1'e' COLLATE latin1_general_ci; 
SELECT @a=@b; # returns 0

测试2

SET @a =_latin1'é' COLLATE latin1_general_ci;
SET @b =_latin1'É' COLLATE latin1_general_ci; 
SELECT @a=@b; # returns 0

看起来它工作不正常,为什么?

0 个答案:

没有答案