Re: correlated delete with 'in' and 'left outer join'

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: correlated delete with 'in' and 'left outer join'
Дата
Msg-id 20040227070104.Q84032@megazone.bigpanda.com
обсуждение исходный текст
Ответ на Re: correlated delete with 'in' and 'left outer join'  (Mike Mascari <mascarm@mascari.com>)
Ответы Re: correlated delete with 'in' and 'left outer join'  (Mike Mascari <mascarm@mascari.com>)
Список pgsql-general
On Fri, 27 Feb 2004, Mike Mascari wrote:

> To do what I think you believe to be happening w.r.t. outer joins,
> you'd have to have a subquery like:
>
> [test@lexus] select a.fookey
> test-# FROM
> test-# (SELECT foo.key AS fookey, bar.key as barkey FROM foo LEFT
> OUTER JOIN bar ON foo.key = bar.key) AS a
> test-# WHERE a.barkey IS NULL;

This AFAICS is pretty much what he did, except that he didn't alias the
join which is okay I believe.  He had one condition in on and two
conditions in where.

The original subquery looked like:
select distinct e.ItemID from LogEvent e left outer join Item i
on e.ItemID = i.ItemID where e.EventType != 'i' and i.ItemID is null


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

Предыдущее
От: "Keith Bottner"
Дата:
Сообщение: Re: Postgres clustering?
Следующее
От: Greg Stark
Дата:
Сообщение: Re: PostgreSQL insert speed tests