SQLite LEFT JOIN Keyword
LEFT JOIN
LEFT JOIN returns all the records from the left table (table1), and the matching records from the right table (table2). When there is no match, the columns from the right table are NULL.

This example selects all the customers, and the orders they have placed:
Example
SELECT Customers.CustomerName, Orders.OrderID
FROM Customers
LEFT JOIN Orders
ON Customers.CustomerID = Orders.CustomerID
ORDER BY Customers.CustomerName;
Try it Yourself »
Customers that have no orders are also in the result. Their OrderID is NULL.
Note: LEFT JOIN is also called LEFT OUTER JOIN. Both mean the same.
Find Records Without a Match
Add WHERE ... IS NULL to find the records that have no match. This example selects the customers that have never placed an order:
Example
SELECT Customers.CustomerName
FROM Customers
LEFT JOIN Orders
ON Customers.CustomerID = Orders.CustomerID
WHERE Orders.OrderID IS NULL;
Try it Yourself »