AI engineering glossary · SQL databases
What is LEFT JOIN?
LEFT JOIN (also called LEFT OUTER JOIN): A join that keeps every row from the left table and fills the right table's columns with NULL when no match exists. It is used to find items with no related records, by filtering for those NULLs.
LEFT JOIN: an example
customers LEFT JOIN orders ... WHERE orders.id IS NULL lists customers who have never ordered.
Related terms
- INNER JOIN
- RIGHT JOIN
- NULL
- Anti-join
More SQL databases terms
- LIMIT and OFFSET
- Locking
- Many-to-many relationship
- Materialized view
- Migration
- MVCC
- N+1 query problem
- Non-repeatable read
Where you learn it
LEFT JOIN is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.