Keep parent rows even if the child is missing.
Section: Join tables
Use a LEFT JOIN
sql
sql
SELECT u.id, u.email, p.title
FROM users u
LEFT JOIN posts p ON p.user_id = u.id;Explanation
Useful when optional related data should not hide the main row.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Join tables