Powered By Blogger

Tuesday, May 24, 2011

JOIN MORE THAN 2 TABLES

JOIN MORE THAN 2 TABLES
=========================

SELECT E.ENAME,E.SAL,D.DEPTNO,A.LOC FROM

EMP E JOIN DEPT D

ON E.DEPTNO=D.DEPTNO

JOIN

ADDR A

ON D.LOC=A.LOC



WITHOUT JOIN
=================


SELECT E.ENAME,E.SAL,D.DEPTNO,A.LOC FROM

EMP E,DEPT D,ADDR A

WHERE

E.DEPTNO=D.DEPTNO

AND

D.LOC=A.LOC