Return rows that match in both tables.
Section: Join tables
Use an INNER JOIN
sql
sql
SELECT p.id, p.title, u.email
FROM posts p
JOIN users u ON u.id = p.user_id;Explanation
The most common join pattern for parent-child data.
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