If I have the query:
SELECT *
FROM Table1 a
Inner Join Table2 b on a.Key = b.Key
Inner Join Table3 c on a.Key = b.Key
What is happening? I recently made this error in some code (wanted instead to join c on on a.Key = c.Key), and while I discovered and fixed it, I was surprised it was allowed to execute and get a result.
I was curious what happens when such a query is called. From what I can tell, it executes a cross join between (table1 join table2) and table3?
Since it is a condition that is always true, it is equivalent to:
,eg a cartesian product of (t1 join t2) * t3.