mysql查询字段是否包含字符串

FIND_IN_SET(str1,str2)

  判断str2是否包含str1

例:

SELECT a.RWID,a.OVERDUECOUNT,a.STATUS,a.USERID,a.INVESTIGATION_DATE,a.CREATE_DATE CREATE_DATE2,b.* FROM hd_check_task a LEFT JOIN hd_check_plain b ON a.PID = b.ID WHERE FIND_IN_SET('"+map.get("createid")+"',a.USERID) and a.STATUS = '0'

 

posted @ 2022-09-07 11:45  _Lawrence  阅读(88)  评论(0编辑  收藏  举报