semi joins

来源:互联网 发布:e筋翻样软件多少钱 编辑:程序博客网 时间:2024/06/08 16:09
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. 
0 0
原创粉丝点击