时间:2021-07-01 10:21:17 帮助过:17人阅读
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}) > 0 mysql中有一个方法 INSTR可以比对两个字符串。