JOIN

Combines rows from two tables that belong together, for example bookings with their villa.

Also called: INNER JOIN, LEFT JOIN, RIGHT JOIN

Source
General
Language
SQL

In plain English

INNER JOIN keeps only rows that have a match on both sides. LEFT JOIN keeps every row of the left table and fills missing matches with NULL (useful for "villas without bookings").

Example

A JOIN brings the villa name into the list of bookings.

In code

SELECT v.name, b.check_in, b.guest_name
FROM bookings b
JOIN villas v ON v.id = b.villa_id
WHERE b.check_in >= CURDATE();

Learn more

Related terms

Added 2026-11-30 · Last reviewed 2026-11-30