public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: Henry B. Hotz <[email protected]>
Cc: Stefan Weiss <[email protected]>
Cc: [email protected]
Subject: Re: INNER JOINS in sql-select.html
Date: Mon, 03 Nov 2003 19:38:21 -0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <p05210602bbcc8fb0d68c@[137.78.212.225]>
References: <[email protected]>
<[email protected]>
<p05210602bbcc8fb0d68c@[137.78.212.225]>
"Henry B. Hotz" <[email protected]> writes:
> You can imply the issue without obfuscating things. How about:
> A CROSS JOIN or INNER JOIN is a simple Cartesian product, the same
> as you get from listing the two items at the top level of FROM.
> CROSS JOIN yields the same results as INNER JOIN ON (TRUE), that is,
> no rows are removed by qualification.
Okay, but that doesn't do the trick --- it implies that CROSS JOIN isn't
equivalent to INNER JOIN ON (TRUE), when in fact they are equivalent,
both as to result and performance characteristics. The issue at hand is
that an explicit "a JOIN b" may not be equivalent to "FROM a, b".
I reworded the passage as
CROSS JOIN and INNER JOIN
produce a simple Cartesian product, the same result as you get from
listing the two items at the top level of FROM,
but restricted by the join condition (if any).
CROSS JOIN is equivalent to INNER JOIN ON
(TRUE), that is, no rows are removed by qualification.
does that help?
regards, tom lane
view thread (5+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: INNER JOINS in sql-select.html
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox