4 ms·
> SELECT * from table1 > FK JOIN table2 What if table1 has been joined in twice, to what table alias is table2 joined against? Example: SELECT * FROM tabl
by JoelJacobson 5y ago
> SELECT * from table1
> FK JOIN table2
What if table1 has been joined in twice, to what table alias is table2 joined against?
Example:
SELECT * FROM table1 a
CROSS JOIN table1 b
FK JOIN table2
Would table2 be joined against "b" or "a"?
I would guess "b" and guess the idea is to always let FK JOIN join against the previous join?
- coolgeek 5y agoYeah, that's a problem. FK JOIN was a casually tossed off addition that, in retrospect, I shouldn't have included.
- JoelJacobson 5y agoAs for your other comments, sounds like we are in agreement on (1) and (3), but just weigh pros/cons differently. > 2) That's not at all clear from your example. Nor does it necessarily follow from the proposal in general Can you provide a counter-example that will not be conciser when written using the foreign key join syntax?