MySQL Tutorial - JOIN - Combine Tables
๐ JOIN - Tables Jodo
Real Life:
๐ฆ Orders + Customers
๐ Books + Authors
๐ Students + Classes
Types
| JOIN Type | Returns |
|---|---|
| INNER JOIN | Matching rows only |
| LEFT JOIN | All left + matching right |
| RIGHT JOIN | All right + matching left |
Example
SELECT orders.id, customers.name
FROM orders
JOIN customers ON orders.customer_id = customers.id;