MicrolearnENPTES

INNER JOIN

Lesson 13 of 24 · SQL.Micro

Data is split across tables and linked by keys. A JOIN puts the pieces back together, matching rows where the keys are equal.

FROM orders o JOIN customers c ON o.customer_id = c.id

Short aliases (o, c) save typing. Prefix columns with the alias when names repeat.

INNER JOIN keeps only rows with a match on both sides.

Check yourself

What happens if you forget the ON condition (FROM a, b)?

Every row of a pairs with every row of b

Show every order id with the name of the customer who placed it.

Do it in the browser: a real SQL tool, a short mission and instant feedback. No install.

Start this lesson — free
← Filtering groups with HAVINGLEFT JOIN →

All lessons · SQL.Micro