使用 EXISTS 方式

select * from A  a where EXISTS(select b.mainInfoId from B b  where b.mainInfoId=a.mainInfoId); 

使用 in  方式
select * from A where id in (select id  from B);

相关文章:

  • 2021-12-18
  • 2021-09-17
  • 2022-12-23
  • 2022-01-29
猜你喜欢
  • 2021-11-27
  • 2022-12-23
  • 2022-12-23
  • 2022-03-02
  • 2021-12-24
  • 2021-09-23
相关资源
相似解决方案