select * from person where id in <foreach collection="array" item="id" index="i" open="(" close=")" separator=","> #{id} </foreach>