How do you select a field that contains only uppercase character in mysql or a field that doesn’t contain any lower case character?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You may want to use a case sensitive collation. I believe the default is case insensitive. Example:
Then:
If you don’t want to use a case sensitive collation for the whole table, you can also use the
COLLATEclause as @kchau suggested in the other answer.Let’s try with a table using a case insensitive collation:
This won’t work very well:
But we can use the
COLLATEclause to collate the name field to a case sensitive collation: