MYSQL查找逗号分隔的字符串中的某个字符FIND_IN_SET

 FIND_IN_SET(str,strlist):该函数的作用是查询字段(strlist)中是否包含(str)的结果,返回结果为null或记录

select count(1) from fault where  FIND_IN_SET('6',image_url);

 image_url列的数据示例:58,27,69

你可能感兴趣的:(数据库,mysql,FIND_IN_SET)