Join Types - III
Outer Join
outer join extends the results of inner join. Along with inner join results it will also return non matched rows from the table with outer join operator(+). Missing values are filled with null.
Left Outer Join
It returns row that meets the join condition + rest of the rows from left table
Right Outer JoinCode:Ex:- select b.dname, a.ename, a.job, a.sal from emp a , dept b where b.deptno = a.deptno(+); Ansi Syntax select b.dname, a.ename, a.job, a.sal from dept b left outer join emp a on a.deptno = b.deptno;
It returns row that meets the join condition + rest of the records from table on the right side.
Full Outer JoinCode:Ex:- select b.dname, a.ename, a.job, a.sal from emp a , dept b where a.deptno(+) = b.deptno; Ansi Syntax select b.dname, a.ename, a.job, a.sal from emp a right outer join dept b on a.deptno = b.deptno;
It returns rows that meet the join codition + rest of the records from both the tables
Code:Ansi Syntax select b.dname, a.ename, a.job, a.sal from emp a full outer join dept b on a.deptno = b.deptno;





Reply With Quote