mysql like case sensitive – 4 ways to Use LIKE Comparison Operator in SQL SELECT Statement for MySQL

mysql like case sensitive : MySQL case-sensitive Search with LIKE. The LIKE statement is used for searching records with partial strings in MySQL.

mysql like case sensitive

When searching for partial strings in MySQL with LIKE you will match case-insensitive by default.

MySQL case-sensitive Search with LIKE

For example, Search all records un members table where name is start with “Pk”.

mysql> SELECT name FROM members WHERE name LIKE 'Pk%';

To do this add BINARY option with like statment and view the results:

Read Also:  CodeIgniter CRUD Example Tutorial From Scratch

mysql>  SELECT name FROM members WHERE name LIKE BINARY 'Pk%';

Don’t Miss : php contain

Case 1 − Using BINARY

mysql> select Name like binary 'RAVI' from members;

Case 2 − Without using BINARY

mysql> select Name like 'RAVI' from members;


I hope you get an idea about mysql like case sensitive.
I would like to have feedback on my infinityknow.com.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.