Question:
How do I search for lower case in MYSQL?
shouldbeworking
2007-03-20 03:43:50 UTC
I need to return all the rows from a table that contain lowercase letters.

Any help with this would be great!!
Five answers:
Jeff Alexander
2007-03-20 12:29:53 UTC
By default string comparisons are case insensitive. You can still check for lowercase by doing something like the following:

create table sample (

col1 as varchar(80),

col2 as varchar(80)

);



select * from sample

where (binary col1 <> upper(col1)) or (binary col2 <> upper(col2));



By looking for data using a binary comparison where the string doesn't match the uppercase version of the string you should be able to find all rows where a string contains a lowercase letter.
?
2017-01-04 19:16:17 UTC
Mysql Lower Case
anonymous
2016-10-06 14:43:20 UTC
Mysql Lowercase
outlaw
2007-03-20 03:57:53 UTC
Normally ANSI standard SQL statements are case-insensitive. As MySql follow ANSI standard, its also case-insensitive. I think you have to use some programming code to find it out. You can use anykind of language to fetch data from mysql and then run some checkings to find out data containing lower-case letters.



(But some versions of Mysql is also case-sensitive. If your version is then try the following function: 'lower' to convert a string to lower case and do other checkings.)
lolita_477
2007-03-20 03:50:09 UTC
hi

you can link to these web site

www.mySQL.com

www.quackit.com

its so helpful for u

i hope i help u


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...