Re: self join

Поиск
Список
Период
Сортировка
От Jasen Betts
Тема Re: self join
Дата
Msg-id iqne7u$ssa$2@reversiblemaps.ath.cx
обсуждение исходный текст
Ответ на self join  (Seb <spluque@gmail.com>)
Ответы Re: self join  (Steve Crawford <scrawford@pinpointresearch.com>)
Список pgsql-sql
On 2011-05-14, Seb <spluque@gmail.com> wrote:
> Hi,
>
> This probably reflects my confusion with how self joins work.
>
> Suppose we have this table:

> If I want to get a table with records where none of the values in column
> b are found in column a, I thought this should do it:

use the "NOT IN" operator with a subquery to retch the disallowed
values.

select * from tmp where a NOT IN (select b from tmp);

-- 
⚂⚃ 100% natural



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

Предыдущее
От: Seb
Дата:
Сообщение: Re: self join
Следующее
От: Harald Fuchs
Дата:
Сообщение: Re: self join