Left-Outer Join in Postgres Not Returning Values for Null

前端 未结 4 833
清歌不尽
清歌不尽 2021-01-04 13:07

A download is comprised of download-times, download-time id, and buno ID. Faults are comprised of fault-codes, download-time id, status, and type. A download can have many

4条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-04 13:43

    This will require a RIGHT OUTER JOIN. The right outer join includes all values from the right table, with NULLs where there is no entry in the left table (I'm not sure if this will work with GROUP BY, though...) if fs_fault were a table with all fault codes.

    In your case, fs_fault seems to contain all faults for a download. Might this be the case for the unexpected behavior?

提交回复
热议问题