第一种 concat
select * from cat_table where cat_name like concat(#{catName},‘%‘) --单个百分号 select * from cat_table where cat_name like concat(concat(‘%‘,#{catName}),‘%‘) --前后百分号
第二种 ||
select * from cat_table where cat_name like ‘%‘ || #{catName} || ‘%‘
第三种 instr
select * from cat_table where instr(#{catName},‘helloworld‘)>0
原文:https://www.cnblogs.com/weibanggang/p/13280527.html