Veiw join & rest of table?

From: Justin Lynch <jlynch(at)hms(dot)uq(dot)edu(dot)au>
To: pgsql-general(at)postgresql(dot)org
Subject: Veiw join & rest of table?
Date: 1999-07-28 00:59:27
Message-ID: 379E55EF.78A0DEDF@hms.uq.edu.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have two tables and I want to see all of one table plus the columns
that join to the other; eg
table1 table2
------- ------
cola colb cola cold
1 a 1 g
2 b 2 h
3 c 3 i
4 d
5 e
6 f

so when I do;
select *
from table1 1, table2 2
where 1.cola=2.cola

I only get
table3
------
cola colb cold
1 a g
2 b h
3 c i

Question:- how do I do a query to display the rest of table1 at the same
time?
ie,
4 d
5 e
6 f
(as well)

Thanks in advance
Justin Lynch

University of Queensland
jlynch(at)hms(dot)uq(dot)edu(dot)au

Browse pgsql-general by date

  From Date Subject
Next Message Randy Dees 1999-07-28 07:47:38 Problems importing my 6.3 database into 6.5.1
Previous Message Gary Hoffman 1999-07-27 18:08:35 Re: [GENERAL] PHP and Postgresql 6.5.1