select * form name where inst in('11','22')能得到inst 为11或22的记录这里面的11和22是两个元素,用in操作的时候11和22都可以匹配select group_concat('\'',content,'\'') from other where FIND_IN_SET(id,getChildList(1))这个得到的结果'11','22'是一个整体,也就是元素是单个就是('11','22') ,括号为了看的清除此时用in就不是匹配11和22两个了
这样写 select * form name where inst in(select content from other where FIND_IN_SET(id,getChildList(1)))
where inst in(select group_concat('\'',content,'\'') from other where FIND_IN_SET(id,getChildList(1)))-> where FIND_IN_SET(inst,(select group_concat('\'',content,'\'') from other where FIND_IN_SET(id,getChildList(1))))
所以你查询不出结果
select * form name where inst in(select content from other where FIND_IN_SET(id,getChildList(1)))
where FIND_IN_SET(inst,(select group_concat('\'',content,'\'') from other where FIND_IN_SET(id,getChildList(1))))