Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Novice > Re: Need help w...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 4 of 4 Topic 3101 of 3323
Post > Topic >>

Re: Need help with INNER Join

by magawake@[EMAIL PROTECTED] ("Mag Gam") May 4, 2008 at 08:12 PM

------=_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 &lt;<a
href="mailto:fbax@[EMAIL PROTECTED]
">fbax@[EMAIL PROTECTED]
>&gt;
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>
&nbsp;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--
 




 4 Posts in Topic:
Need help with INNER Join
magawake@[EMAIL PROTECTED  2008-05-04 10:40:05 
Re: Need help with INNER Join
fbax@[EMAIL PROTECTED] (  2008-05-04 10:52:38 
Re: Need help with INNER Join
nobs@[EMAIL PROTECTED] (  2008-05-04 16:52:13 
Re: Need help with INNER Join
magawake@[EMAIL PROTECTED  2008-05-04 20:12:31 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Dec 5 5:33:39 CST 2008.