Veiw join & rest of table?

Поиск
Список
Период
Сортировка
От Justin Lynch
Тема Veiw join & rest of table?
Дата
Msg-id 379E55EF.78A0DEDF@hms.uq.edu.au
обсуждение исходный текст
Список 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@hms.uq.edu.au

В списке pgsql-general по дате отправления:

Предыдущее
От: ghoffman@ucsd.edu (Gary Hoffman)
Дата:
Сообщение: Re: [GENERAL] PHP and Postgresql 6.5.1
Следующее
От: Randy Dees
Дата:
Сообщение: Problems importing my 6.3 database into 6.5.1