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

相關文章
相關標籤/搜索