4 ms·
Replying here as I don't want to sign up on medium. The blog indicates they believe SELECT * FROM table1, table2 ON table1.id=table2.id; is being parsed a
by advisedwang 9y ago
Replying here as I don't want to sign up on medium.
The blog indicates they believe
SELECT * FROM table1, table2 ON table1.id=table2.id;
is being parsed as:
SELECT
result-column=*
FROM
table-or-subquery=table1
,
join-clause=ON table1.id=table2.id
table-or-subquery=table2
join-operator= EMPTY!!
table-or-subquery=EMPTY!!
join-constraint=ON table1.id=table2
This is not correct, it is being parsed as:
SELECT
result-column=*
FROM
join-clause=table1, table2 ON table1.id=table2.id
table-or-subquery=table1
join-operator=,
table-or-subquery=table2
join-constraint=ON table1.id=table2
In other words, because the constraint is present, both tables are part of the join clause, and `table1, table2` is just another way of writing `table1 JOIN table2`.
- punnerud 9y agoThank you for your good explanation. I have updated the article now with referanse to your answer.