时间:2021-07-01 10:21:17 帮助过:31人阅读
查询时加上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查询区分大小
标签:mysql查询区分大小写