Re: [GENERAL] Negating the list of selected rows of a join

Поиск
Список
Период
Сортировка
От Clark Evans
Тема Re: [GENERAL] Negating the list of selected rows of a join
Дата
Msg-id 36EB623C.AD192ED3@manhattanproject.com
обсуждение исходный текст
Ответ на Negating the list of selected rows of a join  ("Manuel Lemos" <mlemos@acm.org>)
Ответы Re: [GENERAL] Negating the list of selected rows of a join
Список pgsql-general
Manuel Lemos wrote:
> How can I make a query that works the way I want all the time, even for the
> case when table_b is empty?

SELECT table_a.name, table_a.age
  FROM table_a
 WHERE NOT EXISTS (
          SELECT 'x'
            FROM table_b
           WHERE table_b.name = table_a.name
       );


Hope this will do the trick.

:) Clark Evans

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

Предыдущее
От: "Manuel Lemos"
Дата:
Сообщение: PostgreSQL EndTransactionBlock and not inprogress/abort state
Следующее
От: Clark Evans
Дата:
Сообщение: Re: [GENERAL] PostgreSQL EndTransactionBlock and not inprogress/abort state