使用 EXISTS 方式spa
select * from A a where EXISTS(select b.mainInfoId from B b where b.mainInfoId=a.mainInfoId); select
使用 in 方式select * from A where id in (select id from B);co