MySQL regex query case insensitive

Have you tried:

SELECT * FROM `test_tbl` WHERE LOWER(cus_name) REGEXP '^[abc]';

I think you should query your database making sure that the names are lowered, suppose that name is the name you whish to find out, and in your application you've lowered it like 'abraham', now your query should be like this:

SELECT * FROM `test_tbl` WHERE LOWER(cus_name) = name

Since i dont know what language you use, I've just placed name, but make sure that this is lowered and you should retrieve Abraham, ABRAHAM or any variation of the name!

Hepe it helps!

Tags:

Mysql