Skip site navigation (1) Skip section navigation (2)

Re: Need help with INNER Join

From: Emil Obermayr <nobs(at)nobswolf(dot)info>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Need help with INNER Join
Date: 2008-05-04 14:52:13
Message-ID: 200805041652.13785.nobs@nobswolf.info (view raw or flat)
Thread:
Lists: pgsql-novice
Am Sonntag, 4. Mai 2008 schrieb Mag Gam:

> 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 ?

Just concatenate the joins, modern servers do not need hints by brackets and 
such:

select * from a join b on a.id=b.aid join c on b.id=c.bid ;

In that respect, also take a look on "join using" and "natural join".

In response to

pgsql-novice by date

Next:From: Frank BaxDate: 2008-05-04 14:52:38
Subject: Re: Need help with INNER Join
Previous:From: Mag GamDate: 2008-05-04 14:40:05
Subject: Need help with INNER Join

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group