3 messages in com.mysql.lists.javaRe: like with implied lower()?
FromSent OnAttachments
Mark Kattenbelt02 Mar 2001 04:53 
Frank Morton02 Mar 2001 09:52 
Cris Perdue02 Mar 2001 22:30 
Subject:Re: like with implied lower()?
From:Cris Perdue (cr@volunteermatch.org)
Date:03/02/2001 10:30:59 PM
List:com.mysql.lists.java

I was surprised to find that if I have a column "value" that contains "Frank Morton" that the following two queries generate identical results:

select * from table where value like '%morton%';

select * from table where lower(value) like '%morton%';

. . .

Can anyone explain this?

Sure. String comparisons in MySQL are not case-sensitive. So in general MORTON and Morton and morton and MorTon are all like %morton% and %MORTON% and %mOrToN% etc.

-Cris