3 ms·
I've worked in a mixed Oracle / PostgreSQL environment, and I prefer the explicit join syntax. 1. I hate needing to parse/use the '(+)' to denote which way an
by pyre 13y ago
I've worked in a mixed Oracle / PostgreSQL environment, and I prefer the explicit join syntax.
1. I hate needing to parse/use the '(+)' to denote which way an outer join goes. It's much easier to read "left outer join".
2. Separation of concerns. This way all of the conditions that are in the WHERE clause act as filters on the data, and all of the JOIN conditions sit right next the the relevant tables in the FROM clause.
3. I don't even know what the WHERE clause syntax for a CROSS JOIN would be.
4. When a single JOIN has multiple conditions, it's much nicer to have them all together in the FROM clause than to have them scattered (or even grouped) in the WHERE clause.
5. You can use USING. When you're joining two tables on a column with the same name (e.g. product_id), I always find it annoying to be required to specify which table's column to look at since they are guaranteed to be equal.
I don't consider myself a 'database expert', but I spend several years in an environment where 100+ line queries with 5-10 joined tables was not uncommon (so I'm not coming from a place of only having worked with simplistic queries).
- socialist_coder 13y agoOk, you got me on the cross join (i assume you mean full outer join). you have to use the "full outer join" syntax there. (+) syntax is awesome =) I probably should start using the join syntax. Old habits die hard.
- jeffdavis 13y ago"Cross join" means cartesian product; i.e. no WHERE clause.
- socialist_coder 13y agosorry yeah, i just assumed he meant full outer join since its obvious where the where clause would be on a cross join (hint: its no where)