Home›Community›What is the difference between INNER JOIN and LEFT JOIN in …
What is the difference between INNER JOIN and LEFT JOIN in SQL?
Coding Now Expert •
Jun 13, 2026 •
239 views
**INNER JOIN** — returns only rows where there is a match in BOTH tables
**LEFT JOIN** — returns ALL rows from the left table + matching rows from right (NULL if no match)
```sql
-- INNER JOIN
SELECT * FROM orders o
INNER JOIN customers c ON o.customer_id = c.id;
-- Only orders that have a matching customer
-- LEFT JOIN
SELECT * FROM customers c
LEFT JOIN orders o ON c.id = o.customer_id;
-- All customers, even those with no orders
```