Joining Multiple Tables |
||||||
Joining Multiple TablesA three-way join is a join of three tables. You can join as many tables as needed to retrieve information. For example, you might want to find employees, their dependents' names, and the department names for those employees. This requires accessing three tables:- EMPLOYEES, DEPENDENTS, and DEPARTMENTS. In the FROM clause, you identify the tables you want to join.
Example
The ON clause can also be used to join columns that have different names (in the same table or in a different table). For example, you can perform a self-join of the EMPLOYEES table based on the EMPLOYEE_ID and MANAGER_ID columns.
|