sqlserver exists in the difference between

Use EXISTS  way

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);

Guess you like

Origin www.cnblogs.com/ming-blogs/p/11432423.html