标签:mysql查询区分大小写
查询时加上binary关键词就能在查询时区分字符大小如下:
mysql> select name from pe where binary name=‘Claws‘;
+-------+
| name |
+-------+
| Claws |
+-------+
mysql> select name from pe where binary name=‘claws‘;
Empty set (0.00 sec)
like条件的使用:
mysql> select name from pe where name like binary ‘c%‘;
Empty set (0.00 sec)
mysql> select name from pe where name like binary ‘C%‘;
+-------+
| name |
+-------+
| Claws |
+-------+
本文出自 “linux学习之路” 博客,请务必保留此出处http://raystudylinux.blog.51cto.com/9065684/1765634
标签:mysql查询区分大小写
原文地址:http://raystudylinux.blog.51cto.com/9065684/1765634