Return rows where both tables match.
Section: joins
Inner join two tables
sql
sql
SELECT o.id, u.email, o.status
FROM orders o
INNER JOIN users u ON u.id = o.user_id;Explanation
`INNER JOIN` excludes rows without a matching parent or child.
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 joins
Left join to keep unmatched parent rows
Return all rows from the left table and matching rows from the right table.