MySQL SQL

MySQL Joins

Combine related rows from multiple tables.

SELECT p.name, c.name AS category
FROM products p
JOIN categories c ON c.id = p.category_id;

Choose a join type based on whether unmatched rows should remain in the result.