sql - MySQL case-insensitive DISTINCT -
can tell me how can select distinct database without being case-sensitive?
my query
select distinct email `jm_order` the results brings out emails in table repeats ones different cases e.g
sam@gmail.com josh@gmail.com sam@gmail.com john@gmail.com what adjustment can make sql stop repeating sam@gmail.com because different cases?
try use upper function
select distinct upper(email) `jm_order` you can use lower instead
select distinct lower(email) `jm_order`
Comments
Post a Comment