2) semi joins are joins that stop when the first hit is encountered. They are used many times for "existence" checks.
select * from dept where deptno in (select deptno from emp);
that could use a semi join of DEPT to EMP - it would only join each DEPT record to at most ONE emp record - not all of the EMP records as that would create too many DEPT rows. So, it 'semi joins' them.
阅读(1583) | 评论(0) | 转发(0) |