Reputation:
How can I search for a user even if I don't know the exact spelling with regards to case, like
SELECT * FROM USER WHERE U.NAME = 'STEVEN';
Meaning: if a user has the name "Steven" or "sTEVEN" how can I search all persons who have this name?
I tried it, but it does not work.
WHERE email LIKE '%GMAIL%'
It did not not work when case was lowercase.
Upvotes: 1
Views: 167
Reputation: 15961
The case sensitivity is based on the character set and collation of the table.
The default character set and collation are latin1 and latin1_swedish_ci, so nonbinary string comparisons are case insensitive by default.
http://dev.mysql.com/doc/refman/5.0/en/case-sensitivity.html
You may want to look at the collation of your table if the searches are case-sensitive.
Upvotes: 5