What is the difference between a natural join and an inner join?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
One significant difference between INNER JOIN and NATURAL JOIN is the number of columns returned.
Consider:
The
INNER JOINof TableA and TableB on Column1 will returnThe
NATURAL JOINof TableA and TableB on Column1 will return:The repeated column is avoided.
(AFAICT from the standard grammar, you can’t specify the joining columns in a natural join; the join is strictly name-based. See also Wikipedia.)
(There’s a cheat in the inner join output; the
a.andb.parts would not be in the column names; you’d just havecolumn1,column2,column1,column3as the headings.)