Re: JOIN columns with no data

Поиск
Список
Период
Сортировка
От George Weaver
Тема Re: JOIN columns with no data
Дата
Msg-id 000c01c4e7a3$57a58f90$6400a8c0@Dell4500
обсуждение исходный текст
Ответ на JOIN columns with no data  ("Keith Worthington" <keithw@narrowpathinc.com>)
Список pgsql-novice
Keith,

The following should give you what you're looking for

SELECT  Table1.col1, Table1.col2, Table1.col3, Table2.col2
FROM Table1
LEFT JOIN Table2
WHERE Table1.col1 = Table2.col1;

etc.

George

----- Original Message -----
From: "Keith Worthington" <keithw@narrowpathinc.com>
To: "PostgreSQL Novice" <pgsql-novice@postgresql.org>
Sent: Tuesday, December 21, 2004 3:13 PM
Subject: [NOVICE] JOIN columns with no data


> Hi All,
>
> I am trying to create a fairly large join (7 tables) that needs to allow
> NULL
> in columns.
>
> Table 1
> 1 | A | 2
> 2 | B | 3
>
> JOINed with
>
> Table 2
> 1 | note
>
> should output
> 1 | A | 2 | note
> 2 | B | 3 |
>
> Kind Regards,
> Keith
>
> ______________________________________________
> 99main Internet Services http://www.99main.com
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
>



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

Предыдущее
От: "Keith Worthington"
Дата:
Сообщение: JOIN columns with no data
Следующее
От: Jeffrey Melloy
Дата:
Сообщение: Re: How to get day of week?