Simulating an outer join

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Simulating an outer join
Дата
Msg-id 200001121611.LAA03508@candle.pha.pa.us
обсуждение исходный текст
Список pgsql-general
I have been thinking about how to simulate an outer join.  It seems the
best way is to do:

    SELECT tab1.col1, tab2.col3
    FROM tab1, tab2
    WHERE tab1.col1 = tab2.col2
    UNION ALL
    SELECT tab1.col1, NULL
    FROM tab1
    WHERE tab1.col1 NOT IN (SELECT tab2.col2 FROM tab2)

Comments?  I know someone was asking about this recently.

--
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

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

Предыдущее
От: "Robert Wagner"
Дата:
Сообщение: identifying performance hits: how to ???
Следующее
От: Karl DeBisschop
Дата:
Сообщение: Re: [GENERAL] identifying performance hits: how to ???