Anthony Molinaro wrote:
that query is 100% correct.
it's just an equijoin (a type of inner join) between 3 tables. the syntax you show is how queries should be written and is more
representative of what a joins between relations really are:
Cartesian products with filters applied
the ansi syntax, the explicit JOIN ... ON stuff is (imho) unnecessary,
useful only for outer joins since all the vendors did it differently.


Whether you feel that is unnecessary or not, it *is* the ANSI Standard and is thus, by definition, "how queries should be written."

In addition to cleaning up the outer join issue, it was added to make the *intention* of the query clearer.

Because others are likely to read your query many more times than you write it, clarity of intent *is* important.

what you have will work for postgreSQL, I used the syntax you show in my
book
for every single join recipe except for outjoins.
are you seeing errors? regards,
  Anthony

[original snipped]

--
Daryl

"We want great men who, when fortune frowns, will not be discouraged."
    -- Colonel Henry Knox, 1776


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to