SQL - Structured Query Language |
Joins with ClauseJoin query can define with WHERE clause that used to retrieve list of common columns matched data value records between child and parent tables with a criteria. The following inner join query is used to retrieve EMP table�s particular record that matched with DEPT table's record. The common colum is DEPT_CODE and the criteria is Employee Name. -- Example 36 --
SELECT EMP.Emp_Code, EMP.Emp_Name, EMP.Dept_Code, DEPT.Dept_Name FROM EMP INNER JOIN DEPT ON EMP.Dept_Code = DEPT.Dept_Code WHERE EMP.Emp_Name = 'Employee 105' Query Output Screen |
* * * * *