简体   繁体   English

MySQL:WHERE IN子句区分大小写吗?

[英]MySQL: Is WHERE IN clause case sensitive?

I was just wondering if the IN clause in MySQL is case sensitive or not when it comes to string values. 我只是想知道MySQL的IN子句是否区分大小写。 For example below. 例如下面。 Will it display all the data regardless if it is on upper case or not? 不管是否使用大写字母,它都会显示所有数据吗?

SELECT Column1 FROM Table1 WHERE Column2 IN ('sample1','Sample2','sampLe3')

It is actually based on your db/table/column collation. 它实际上基于您的db / table / column排序规则。 If your collation is case-sensitive, the operator will also behave case-sensitively. 如果您的排序规则区分大小写,则运算符也将区分大小写。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM