1. Left OUTER JOIN: External Association SELECT E.last_name, e.department_id, D.department_name
From Employees E
Left OUTER JOIN Departments D
On (e.department_id = d.department_id);
Equivalent to
SELECT E.last_name, e.department_id, D.department_name
From Employees e, departments D
WHERE e.department_id=d.department_id (+);
The result is a record of all employees and corresponding departments, including employee records with no corresponding department number department_id.
2. Right OUTER JOIN: left-Outer association SELECT E.last_name, e.department_id, D.department_name
From Employees E
Right OUTER JOIN Departments D
On (e.department_id = d.department_id);
Equivalent to
SELECT E.last_name, e.department_id, D.department_name
From Employees e, departments D
WHERE e.department_id (+) =d.department_id;
The results are: Records of all employees and corresponding departments, including departmental records without any employees.
3. Full OUTER JOIN: Total External Association SELECT E.last_name, e.department_id, D.department_name
From Employees E
Full OUTER JOIN Departments D
On (e.department_id = d.department_id);
The results are: Records of all employees and corresponding departments, including employee records with no corresponding department number department_id, and departmental records without any employees.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.