阅读背景:

如何用JOIN替换NOT EXISTS?

来源:互联网 

I've got the following query:

我有以下查询:

select distinct a.id, a.name
from Employee a
join Dependencies b on a.id = b.eid
where not exists 
    ( 
select * 
    from Dependencies d 
    where b.id = d.id 
    and d.name  = 'Apple'
    )
and exists 
    (
    select * 
    from Dependencies c 
    where b.id = c.id 
    and c.name  = 'Orange'
    );
selec



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: