Jump to content

Need help with case insensitive select


rain13

Recommended Posts

Hello I am having problem with case insensitive select: I have tried.

SELECT LOWER( Name )FROM `users`WHERE LOWER(`Name`) = LOWER('somename')

and

SELECT LOWER( Name )FROM `users`WHERE LOWER(`Name`) LIKE LOWER('somename')

But I get MySQL returned an empty result set (i.e. zero rows). ( Query took 0.0006 sec ). when somename has some upper case letters. How do I construct case insensitive select?Edit: I have also tried SELECT Name FROM users WHERE Name LIKE 'somename' but as soon as I change case of 'somename' it doesn't find anything.Edit: it didnt work because table was in binary encoding.

Edited by SoItBegins
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...