日期:2014-05-16  浏览次数:20606 次

子查询变为联接查询
select mc.first_name,mc.last_name,jc.title
from job_current jc
natural join my_contacts mc
where jc.title in
(select title from job_listings);

select mc.first_name,mc.last_name,jc.title
from job_current jc, my_contacts mc
where jc.title in
(select title from job_listings)
and jc.contact_id=mc.contact_id;

select mc.first_name,mc.last_name,jc.title
from job_current jc
natural join my_contacts mc
inner join job_listings jl
on jc.title = jl.title;

select mc.first_name,mc.last_name,jc.title
from job_current jc, my_contacts mc, job_listings jl
where jc.contact_id=mc.contact_id
and jc.title = jl.title;
?