Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
親テーブルと子テーブルの 2 つのテーブルがあり、子テーブルには外部キー制約が含まれています。
親テーブルへの結合を使用して子テーブルからデータを取得し、子テーブルから親テーブル ID が null であるレコードも取得したいと考えています。
select * from child c left join parent p on c.id = c.parent_id;