LEFT JOIN1 / 10
A Left Join keeps all rows from the first table (or "left" table) and shows results from the second table (or "right" table) only where there's a match. If there's no match, it shows null for the values in the joined row. Try typing:

SELECT *
FROM cars
LEFT JOIN owners
ON cars.car_id = owners.car_id;

Table cars

car_idmakemodelyear
1ToyotaCamry2020
2HondaCivic2019
3FordMustang2021
4TeslaModel 32022
5ChevroletImpala2018

Table owners

owner_idcar_idowner_name
11Alice
22Bob
34Carlos

No key for < or > on your keyboard? Use these:

Ctrl+Enter to submit

πŸ”₯ 0 streak
⭐ 0 XP this lesson
All Lessons

LEFT JOIN - Free SQL Practice Online

Practise LEFT JOIN with 10 free, interactive SQL exercises. You type real queries into your browser and get instant feedback on every answer - no database setup, no install, and no signup. It is a fast, hands-on way to learn SQL online and build query skills you can use at work.