3 ms·
or ON: select * from foo join bar on (foo.x = bar.y) if the columns have a different name. I tend to write my joins first, then use where clauses as filters.
by rswail 5y ago
or ON:
select * from foo join bar on (foo.x = bar.y) if the columns have a different name.
I tend to write my joins first, then use where clauses as filters. A select * from foo left inner join on (foo.x = bar.y) is semantically equivalent to foo, bar where foo.x = bar.y, but keeping the joins separate from the filters makes the query more clear.