Re: ORDER BY does not work as expected with multiple joins

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: ORDER BY does not work as expected with multiple joins
Дата
Msg-id 25485.1137167776@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: ORDER BY does not work as expected with multiple joins  (Adam Rosi-Kessel <adam@rosi-kessel.org>)
Список pgsql-sql
Adam Rosi-Kessel <adam@rosi-kessel.org> writes:
> But I am curious why you think a LEFT JOIN should be used rather than RIGHT
> JOIN? I think I believe I am getting the desired set of records. When I
> substitute LEFT JOIN for RIGHT JOIN I actually get the same result. Can you
> help me understand under what conditions, in this case, I would obtain a
> different result?

Try some cases where there are IDs in the ID/name table that do not
appear in the linking table, or the other way around.  If you still
like your results in those situations, then it's the right way for you.
        regards, tom lane


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

Предыдущее
От: Michael Glaesemann
Дата:
Сообщение: Re: ORDER BY does not work as expected with multiple joins
Следующее
От: Michael Glaesemann
Дата:
Сообщение: Re: ORDER BY does not work as expected with multiple joins