试试下面这句行不select name from B where id find_in_set(id,select sevice from A where id=1)
select * from `B` where `id` IN ( 6 , 9 , 7 )