sqlserver exists 与 in 的区别

使用 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

相关文章
相关标签/搜索