mysql喜欢语句而不是默认情况下对病例不敏感的语句
据我所知,就像MySQL中的语句一样,默认情况下对案例不敏感此处显示。
就我而言,例如,他们似乎不是,例如select *从concat(名称,',姓氏)的用户中选择 *,例如'%rob%'
不返回任何东西,而select *从concat(name,'',姓氏)的用户中,例如'%rob%'
返回其“名称”列为“ Robert”的记录。
我想要从用户中选择 * concat(name,'',姓氏),例如'%rob%'
才能返回其“名称”列为“ Robert”的记录。
As far as I know, LIKE statements in MySQL are case-insensitive by default as shown here.
In my case, it seems they are not, for instance SELECT * FROM users WHERE CONCAT(name, ' ', surname) LIKE '%rob%'
doesn't return anything, while SELECT * FROM users WHERE CONCAT(name, ' ', surname) LIKE '%Rob%'
returns a record whose "name" column is "Robert".
I want SELECT * FROM users WHERE CONCAT(name, ' ', surname) LIKE '%rob%'
to return the record whose "name" column is "Robert".
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
本文中描述的信息不正确。字符串操作中的情况敏感性取决于整理。
mysql 8.0参考手册/角色集,collations,collations,collations,unicode 。
1 green 1 em> db< https://dbfiddle.uk/?rdbms=mysql_8.0& fiddle=3cdb69bf824d9f20373666f813cbbbb75b8“ rel =“ nofollow noreferrer”>在这里
The information described in this article is not correct. The case sensitivity in string operations depends on the collation.
MySQL 8.0 Reference Manual / Character Sets, Collations, Unicode.
db<>fiddle here