3

私はOracle SQLを学んでいますが、今は結合の章で立ち往生しています。結合と自然結合の違いがわかりません

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/03/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 の両方に同様の機能があるのに、なぜ異なる結果が得られるのかわかりません。

4

2 に答える 2