I will try to explain the difference between NATURAL JOIN and INNER JOIN on the basis of use-case.
We have two tables T1(A, B, C, D) & T2(B, C, X, Y), where the alphabets (A, B, C, D, X, Y) represent fields/attributes.
CASE 1: say I have to pull all rows which have a common entry in 'C' across both tables.
query: SELECT * FROM T1 INNER JOIN T2 ON T1.C=T2.C;
EXPLAINATION ON WHY NATURAL JOIN WILL NOT WORK IN THE ABOVE CASE --
say we use NATURAL JOIN.
SELECT * FROM T1 NATURAL JOIN T2;
We know that, T1 & T2 have two similar attributes/fields ('B' and 'C')
so, NATURAL JOIN will look for all such entries where
(T1.B=T2.B) AND (T1.C=T2.C)
Only the rows which satisfy the above condition, will be included in the result set.
Whereas, we only need the rows to have a common entry for field 'C' for our purpose.
NATURAL JOIN
is a join type in its own right and is not as simple as you describe e.g. it eliminates the duplicate columns the nearest equivalentINNER JOIN
is compelled to generate for legacy (pre-1992) purposes. – Conquian