Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

couldn't you do a union all instead of outer join on false?


Nope, because unions merge columns. `select * from Actor union select * from Movies` gives you [(0, "Harrison Ford"), (0, "Indiana Jones")], which is a problem because we can't tell which rows are actors and which rows are movies. What we need is [(0, "Harrison Ford", null, null), (null, null, 0, "Indiana Jones")].


Yes, you could use union. But then you have to pad the columns of the other tables with NULLs to arrive at the same output and carefully count. And we all hate counting.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: