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

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: (view raw, whole thread or download thread mbox)
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 
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
4     d
5     e
6     f
(as well)

Thanks in advance
Justin Lynch

University of Queensland

pgsql-general by date

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

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