mybatismysql
select e.`id`,e.`employeeid`,e.`chnname`,e.`engname`,e.`sex`,e.`mobile` from tb_pcm_coach c,tb_sys_employee e,tb_sys_employeetype tt, tb_sys_department d where c.id=e.id and e.id=tt.employee and e.dept = d.id and e.status='fdcaaf7c-8fe8-4340-993e-9e29000b6f14' and tt.employeetype= #{employeetype} and instr(d.treekey, #{dept}) = 1 and c.coachlevel= #{coachlevel} and e.id != #{eid} and e.chnname like '%#{chnname}%' 最下面like我想查e.chnname包括传入的chnname,也就是like的值不固定,请问应该怎么写?已解决,我从其他模块借鉴的 and instr(d.departmentname,#{departmentname}) > 0mysql中有一个方法 instr可以比对两个字符串。