mysql数据库编码格式utf8_general_ci、utf8_bin、utf8_general_cs区别

在做一个bug排查时发现,代码写的是模糊查询,但是就是实现不了,后来发现编码格式有问题,现将三种utf8格式列举如下:

mysql数据库编码格式utf8_general_ci、utf8_bin、utf8_general_cs区别:

utf8_bin将字符串中的每一个字符用二进制数据存储,区分大小写。(bin -> binary二进制的意思)

utf8_genera_ci不区分大小写,ci为case insensitive的缩写,即大小写不敏感。

utf8_general_cs区分大小写,cs为case sensitive的缩写,即大小写敏感。

猜你喜欢

转载自blog.csdn.net/qq_39314099/article/details/88528387