Only users who have a matching subscription row appear.
Section: Common join patterns
Inner join active users with subscriptions
sql
sql
SELECT u.user_id, u.email, s.plan_code
FROM users u
JOIN subscriptions s ON s.user_id = u.user_id
WHERE s.status = 'active';Explanation
`JOIN` without a modifier means `INNER JOIN` in most SQL dialects.
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 Common join patterns
Left join to find users without subscriptions
Find unmatched left-side rows by checking for `NULL` on the right.
Full outer join to compare two datasets
See items present in one side, the other side, or both.
Emulate FULL OUTER JOIN where unsupported
Use a `LEFT JOIN` + unmatched rows from the other side via `UNION ALL`.