SQLite LEFT JOIN operation

Below is a LEFT JOIN operation example in SQLite query language:

SELECT city, country
FROM orders
LEFT JOIN clients
ON orders.customer_id = clients.client_id

LEFT JOIN query will return all rows from the left table (in this case the orders table), even if there is no matching entry in right table (in this case clients table). But only the entries of the right table will be returned (i.e. joined or added) for which the matching criteria (matching customer_id and client_id) is satisfied.

Close

Meta