SQL 2023 · Joins and combining queries
Join two tables
Return rows that have a match in both tables.
SELECT o.id, u.name FROM orders o JOIN users u ON u.id = o.user_id;
Official SQL 2023 documentation
More joins and combining queries commands
- Keep rows without a match
- Find rows with no match
- Check that related rows exist
- Filter with a subquery
- Stack two result sets
- Name a subquery with a CTE
All joins and combining queries commands · SQL 2023 cheatsheet