Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySQL: Is WHERE IN clause case sensitive?

Tags:

mysql

I was just wondering if the IN clause in MySQL is case sensitive or not when it comes to string values. 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')
like image 593
Mark Vincent Manjac Avatar asked Feb 01 '26 01:02

Mark Vincent Manjac


1 Answers

It is actually based on your db/table/column collation. If your collation is case-sensitive, the operator will also behave case-sensitively.

like image 193
Avalanche Avatar answered Feb 02 '26 16:02

Avalanche



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!