LEFT OUTER JOIN

noun

say it: “LEFT OW-ter JOYN” /lɛft ˈaʊtər dʒɔɪn/

A join that returns every row from the left table, with matching rows from the right or NULLs where there's no match.

What is LEFT OUTER JOIN in a relational database?

LEFT OUTER JOIN — A join returning every left row and matching right rows, using NULLs when no right match exists.

SELECT customer.email, purchase_order.order_id
FROM customer
LEFT OUTER JOIN purchase_order
    ON purchase_order.customer_id = customer.customer_id;

In a sentence

  • “A LEFT JOIN lists every customer, even those with no orders.”

Level: Apprentice · More SQL terms at this level

Updated