A LEFT JOIN returns all rows from the left table and matching rows from the right table. Non-matching right rows are NULL.
Syntax
SELECT a.col1, b.col2
FROM table_a a
LEFT JOIN table_b b ON a.id = b.a_id;
Lesson 10 of 22 · SQLite
Learn SQL LEFT JOIN and find rows with no match using IS NULL.
A LEFT JOIN returns all rows from the left table and matching rows from the right table. Non-matching right rows are NULL.
SELECT a.col1, b.col2
FROM table_a a
LEFT JOIN table_b b ON a.id = b.a_id;
Find the people who don't have a driver's licence. Return just their names.
Solve it in your browserFree, no sign-up. The SQLite database runs in your browser; your answer is checked instantly, with hints if you need them.