regex - How to check for uppercase letters in MySQL? -


i want check, if string consits of uppercase letters. know rlike/regexp not case sensitive in mysql. tried use :upper: character class:

select 'z' regexp '^[[:upper:]]+$'; 

this gives true, although z in lower case,... why?

regexp not case sensitive, except when used binary strings.

http://dev.mysql.com/doc/refman/5.7/en/regexp.html

so in mind, this:

select * `users` `email` regexp binary '[a-z]'; 

using above example, you'd list of emails contain 1 or more uppercase letters.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -