SQL - Structured Query Language

Left Outer Join



Left outer join is used to retrieve list of common columns matched and child table's NULL data value records between child and parent tables. Common columns must define in the left outer join query. The following left outer join query is used to retrieve list of EMP table's records that matched or null with DEPT table's records. The common column is DEPT_CODE.

-- Example 33 --

 

SELECT EMP.Emp_Code, EMP.Emp_Name, EMP.Dept_Code, DEPT.Dept_Name

FROM EMP

LEFT OUTER JOIN DEPT

ON EMP.Dept_Code = DEPT.Dept_Code


Query Output Screen



* * * * *


Email Your Comment To AUTHOR