sql MySQL怎么反过来LIKE某个字段

来源:互联网 发布:php fsockopen post 编辑:程序博客网 时间:2024/04/30 07:21

like concat('%',字段,'%')

 

SELECT count(1) , a.fd_name  FROM `wj_replay` r ,
(select fd_name,fd_id FROM sys_org_element WHERE
fd_parentid =  '12f57b369d752287395ec7244e889f95'  and fd_org_type =2 ) a where
 r.fd_hierarchy_id  LIKE  concat('%',a.fd_id,'%')   and r.oid = 22  group by a.fd_id

原创粉丝点击