全外连接是在结果中除了显示满足连接的条件的行外,还显示了join两侧表中所有满足检索条件的行。
SQL> select e.empno,e.ename,e.sal,d.grade
2 from emp e full outer join salgrade d
3 on e.sal between d.losal and d.hisal;
EMPNO ENAME SAL GRADE
---------- ---------- ---------- ----------
7839 KING 5000 5
7902 FORD 3000 4
7788 SCOTT 3000 4
7566 JONES 2975 4
7698 BLAKE 2850 4
7782 CLARK 2450 4
7499 ALLEN 1600 3
7844 TURNER 1500 3
7934 MILLER 1300 2
7521 WARD 1250 2
7654 MARTIN 1250 2
7876 ADAMS 1100 1
7900 JAMES 950 1
7369 SMITH 800 1
7937 Candy 500 6