Reputation: 305
I had an interview today where they asked the question, "Tell me the difference between a JOIN and INNER JOIN." I proceeded to explain what INNER JOIN is, and started to talk about LEFT JOIN. The interviewer interrupted me and said, "No I didn't say LEFT JOIN, just JOIN." I was honestly stuck because I never used "JOIN" I always specified LEFT JOIN.
He told me that LEFT JOIN and JOIN act the same. When looking up "JOIN" I can't find any information saying that it works just like left join.
Does JOIN work the same as LEFT JOIN? Is it normal, for tech/IT jobs, to have trick questions like this?
Upvotes: 0
Views: 55
Reputation: 1269503
Plain old JOIN
is a synonym for INNER JOIN
. That is quite different from a LEFT JOIN
SQL implements through explicit syntax five JOIN
operations:
CROSS JOIN
INNER JOIN
LEFT JOIN
RIGHT JOIN
FULL JOIN
In addition, "join" can colloquially mean "combining rows from two tables" and there are other join types -- such as semi-joins.
Upvotes: 1