select * from tablename
where id in
<foreach collection="ids.split(',')" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
或
select * from tablename
where
find_in_set(id,#{ids})
select * from tablename
where id in
<foreach collection="ids.split(',')" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
或
select * from tablename
where
find_in_set(id,#{ids})
619
814

被折叠的 条评论
为什么被折叠?