| От | Sim Zacks |
|---|---|
| Тема | join condition against where with coalesce |
| Дата | |
| Msg-id | ej6m1n$1qep$1@news.hub.org обсуждение исходный текст |
| Ответы |
Re: join condition against where with coalesce
Re: join condition against where with coalesce |
| Список | pgsql-general |
Should there be any difference between: select * from table1 a left join table2 b on a.pk=b.fk and b.typeid=14 and select * from table1 a left join table2 b on a.pk=b.fk where coalesce(b.typeid,14)=14 The reason I need to use the coalesce is because my goal is to do it with a full join and can't use the and condition because it is not merge-joinable. My test with the left join showed me that with the where it doesn't give any results, while I would expect it to give me all the results in the first table. Any thoughts?
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера