SQL Tutorial : DRL / DQL - EQUI JOIN
Let's learn about next topic: EQUI JOIN
EQUI JOIN:
************
- SELECT E.LAST_NAME,E.SALARY ,D.DEPARTMENT_NAME,E.DEPARTMENT_ID
FROM EMPLOYEES E,DEPARTMENTS D
WHERE E.DEPARTMENT_ID =D.DEPARTMENT_ID
- SELECT E.LAST_NAME,E.SALARY ,D.DEPARTMENT_NAME,L.CITY
FROM EMPLOYEES E,DEPARTMENTS D,LOCATIONS L
WHERE E.DEPARTMENT_ID =D.DEPARTMENT_ID AND D.LOCATION_ID=L.LOCATION_ID
AND E.DEPARTMENT_ID IN(30,40)
- N TABLES => N-1 JOIN CONDITIONS
No comments:
Post a Comment