sql函数——find_in_set()

可用于查询以都好分隔开的数据

strlist 字段名 参数以”,”分隔 如 (1,2,6,8)

select FIND_IN_SET('2', '1,2'); 返回2 

SELECT t.dept_id FROM sys_dept t WHERE  find_in_set(#{deptId}, ancestors);

  

原地址:https://www.cnblogs.com/lixinjun8080/p/11246632.html

原文地址:https://www.cnblogs.com/lucky-jun/p/14718964.html