-Cross connection (produces Cartesian product)
SELECT * from the EMP Cross join dept;
--Natural connection (can automatically match related fields and eliminate Cartesian product)
SELECT * FROM EMP Natural JOIN dept;
--join ... The using,using clause is followed by the associated field
SELECT * FROM EMP e join dept using (DEPTNO);
--join ... The On,on clause is followed by the associated condition
SELECT * from emp e joins Salgrade s on (e.sal between S.losal and S.hisal);
--Left outer connection OUTER join ... On
SELECT * FROM EMP e left outer joins Dept D on (e.deptno = D.deptno);
-left outer joins can also be written like this:
SELECT * FROM EMP E, dept d where E.deptno = D.deptno (+);
--Right outer connection OUTER join ... On
SELECT * FROM EMP e right outer joins Dept D on (e.deptno = D.deptno);
--right outer joins can also be written like this:
SELECT * FROM EMP E, Dept D where E.deptno (+) = D.deptno;
--Full out-of-the-OUTER joins
SELECT * FROM EMP e full outer joins Dept D on (e.deptno = D.deptno);
Oracle Connection Query