我正在学习 Oracle SQL,现在我被困在 Joins 章节中。我无法理解 Join 和 Natural Join 之间的区别
SELECT employee_id, job_id, department_id,
e.last_name, e.hire_date, j.end_date
FROM employees e
NATURAL JOIN job_history j;
176 SA_REP 80 泰勒 2006 年 3 月 24 日 2006 年 12 月 31 日
SELECT e.employee_id, e.job_id, e.department_id,
e.last_name, e.hire_date, j.end_date
FROM employees e
JOIN job_history j
ON (e.department_id = j.department_id)
ORDER BY employee_id, last_name;
172 SA_REP 80 Bates 24/03/2007 31/12/2006
173 SA_REP 80 Kumar 21/04/2008 31/12/2007
173 SA_REP 80 Kumar 21/04/2008 31/12/2006
174 SA_REP 80 Abel 11/05/2004 31/12/2007
174 SA_REP 80 Abel 11/05/2004 31/12/2006
175 SA_REP 80 Hutton 19/03/2005 31/12/2007
175 SA_REP 80 Hutton 19/03/2005 31/12/2006
176 SA_REP 80 Taylor 24/03/2006 31/12/2007
176 SA_REP 80 Taylor 24/03/2006 31/12/2006
177 SA_REP 80 Livingston 23/04/2006 31/12/2007
177 SA_REP 80 Livingston 23/04/2006 31/12/2006
如果 Join 和 Natural Join 都具有相似的功能,我不知道为什么会收到不同的结果。