As long as the contactid is not null in any of the tables its easy. You
didn't give any column name information so I'll wing it. Not knowing the
relationships between the tables means this might get you a fair amount of
repeat data. If there is only ONE row in each table for a given contactid
it'll work ok.
SELECT street,phone,contname FROM Address a, PhoneNumber p, Contact c WHERE
a.contactid=p.contactid and a.contactid=c.contactid;
I have no affiliation with cold remedy manufacturers (heh, Contact c...)
"Stephan Richter" <srichter(at)cbu(dot)edu> wrote in message
> Hello, I have the following situation:
> I have an Address, PhoneNumber and Contact table all having a contactid in
> common, but sometimes the phone number does not exist.
> I want to join these three tables. How do I do that? I could not find the
> syntax for multiple tables...
> Stephan Richter
> CBU - Physics and Chemistry Student
> Web2k - Web Design/Development & Technical Project Management
In response to
pgsql-sql by date
|Next:||From: Ramesh H R||Date: 2001-01-23 06:00:44|
|Subject: Image in database|
|Previous:||From: Bruce Momjian||Date: 2001-01-23 02:29:50|
|Subject: Re: MySQL -> Postgres dump converter|