有一组数据:Apple OranGe BananA 等,都是这样大小写混写的一组数据,存在表 fruit中的A列中select A from fruit where a like '%XXX%'
希望 XXX 这个 where 条件可以不区分大小写,比如我在 XXX 处写一个“app”就可以把 Apple 查出来
希望 XXX 这个 where 条件可以不区分大小写,比如我在 XXX 处写一个“app”就可以把 Apple 查出来
select A from fruit where LOWER(a) like '%XXX%'
select A from fruit where instr(upper(a), upper('app'))>0;%XXX% 这样使用不了index,instr(upper(a), upper('app')) 可以建立function index;
select A from fruit where upper(a) like upper('%XXX%')