pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Davis <mdavis@sevainc.com>
To: 'Stephan Richter' <srichter@cbu.edu>
To: pgsql-sql@postgresql.org <pgsql-sql@postgresql.org>
Subject: RE: Joining several tables
Date: Mon, 22 Jan 2001 11:00:23 -0700
Message-ID: <01C08462.886C1520.mdavis@sevainc.com> (raw)

1) Select t1.* from table_1 t1, table2 t2 where t1.column = t2.column;
2) Select t1.* from table_1 t1 join table2 t2 on t1.column = t2.column;


-----Original Message-----
From:	Stephan Richter [SMTP:srichter@cbu.edu]
Sent:	Sunday, January 21, 2001 11:20 PM
To:	pgsql-sql@postgresql.org
Subject:	Joining several tables

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

Regards,
Stephan
--
Stephan Richter
CBU - Physics and Chemistry Student
Web2k - Web Design/Development & Technical Project Management




view thread (3+ messages)  latest in thread

Message-ID: <01C08462.886C1520.mdavis@sevainc.com>
Permalink:  ../01C08462.886C1520.mdavis@sevainc.com/
Also on:    postgresql.org/message-id/01C08462.886C1520.mdavis@sevainc.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: mdavis@sevainc.com, srichter@cbu.edu
  Subject: Re: Joining several tables
  In-Reply-To: <01C08462.886C1520.mdavis@sevainc.com>
  References: <01C08462.886C1520.mdavis@sevainc.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox