Isn't JOIN used for the INNER JOIN? How it is used here in place of CROSS JOIN?
In the lectures about INNER JOIN, instructor told us that the JOIN can be used in place of INNER JOIN, which is totally fine. Why here in this lecture the instructor is using it in place of CROSS JOIN? How is this possible?
Hi Rafi!
Thanks for reaching out.
In the lectures about INNER JOIN, the instructor mentioned that JOIN can be used in place of INNER JOIN, which is correct and totally fine. However, in this lecture, the instructor is using CROSS JOIN.
The logic here is that we want a Cartesian product of the tables involved. A CROSS JOIN produces a Cartesian product, which means every row from the first table is combined with every row from the second table. While INNER JOIN combines rows based on a matching condition, CROSS JOIN does so without any condition, leading to all possible combinations of rows.
Hope this helps.
Best,
Tsvetelin