------=_Part_14841_22783514.1209946351871
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
All,
thanks for the help. I will try this.
TIA
On Sun, May 4, 2008 at 10:52 AM, Frank Bax <fbax@[EMAIL PROTECTED]
> wrote:
> Mag Gam wrote:
>
> > When I needed to join tables I always used the equal syntax (ie.
SELECT
> > id from foo,fee where id.foo=id.fee)
> > To my understanding, it is preferred to use the INNER JOIN keyword. I
> > am able to INNER JOIN 2 tables, but I am not sure of the syntax for 3
or
> > more tables. Can someone please show me an example for that ?
> >
>
>
> Your example will not work; you should have written:
>
> SELECT foo.id from foo,fee where foo.id=fee.id
>
> With inner join, this would be
>
> SELECT foo.id FROM foo
> INNER JOIN fee on foo.id=fee.id
>
> Joining a third table would look like
>
> SELECT foo.id FROM foo
> INNER JOIN fee ON foo.id=fee.id
> INNER JOIN bar ON bar.id=foo.id
>
>
>
>
> --
> Sent via pgsql-novice mailing list (pgsql-novice@[EMAIL PROTECTED]
)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-novice
>
------=_Part_14841_22783514.1209946351871
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
All, <br><br>thanks for the help. I will try
this.<br><br>TIA<br><br><br><div class="gmail_quote">On Sun, May 4, 2008
at 10:52 AM, Frank Bax <<a
href="mailto:fbax@[EMAIL PROTECTED]
">fbax@[EMAIL PROTECTED]
>>
wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid
rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">Mag Gam wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204,
204, 204); padding-left: 1ex;">
When I needed to join tables I always used the equal syntax (ie. SELECT id
from foo,fee where id.foo=id.fee)<br>
To my understanding, it is preferred to use the INNER JOIN keyword.
I am able to INNER JOIN 2 tables, but I am not sure of the syntax for 3 or
more tables. Can someone please show me an example for that ?<br>
</blockquote>
<br>
<br></div>
Your example will not work; you should have written:<br>
<br>
SELECT <a href="http://foo.id"
target="_blank">foo.id</a> from foo,fee
where foo.id=<a href="http://fee.id"
target="_blank">fee.id</a><br>
<br>
With inner join, this would be<br>
<br>
SELECT <a href="http://foo.id"
target="_blank">foo.id</a> FROM foo<br>
INNER JOIN fee on foo.id=<a href="http://fee.id"
target="_blank">fee.id</a><br>
<br>
Joining a third table would look like<br>
<br>
SELECT <a href="http://foo.id"
target="_blank">foo.id</a> FROM foo<br>
INNER JOIN fee ON foo.id=<a href="http://fee.id"
target="_blank">fee.id</a><br>
INNER JOIN bar ON bar.id=<a href="http://foo.id"
target="_blank">foo.id</a><div><div></div><div class="Wj3C7c"><br>
<br>
<br>
<br>
-- <br>
Sent via pgsql-novice mailing list (<a
href="mailto:pgsql-novice@[EMAIL PROTECTED]
"
target="_blank">pgsql-novice@[EMAIL PROTECTED]
>)<br>
To make changes to your subscription:<br>
<a href="http://www.postgresql.org/mailpref/pgsql-novice"
target="_blank">http://www.postgresql.org/mailpref/pgsql-novice</a><br>
</div></div></blockquote></div><br>
------=_Part_14841_22783514.1209946351871--


|