SQL Playground
TutorialsPlayground
SQL FormatterSQL MinifierSyntax ValidatorJSON to SQLCSV to SQLSQL to JSONER Diagram Generator
Daily ChallengeInterviewsCheat SheetBlog

© 2026 SQL Playground. Built for developers.

PrivacyTermsAboutRSS Feed
SQL Playground
TutorialsPlayground
SQL FormatterSQL MinifierSyntax ValidatorJSON to SQLCSV to SQLSQL to JSONER Diagram Generator
Daily ChallengeInterviewsCheat SheetBlog
Initializing...
Chapter 3: Joining Tables
3-1
Your Progress

The LEFT JOIN

A LEFT JOIN returns all records from the left table (Users), and the matched records from the right table (Orders).

If there is no match, the result is NULL on the right side.

Visual Demo: Look at the visualization panel on the right. It shows how:

  1. Alice matches 2 orders.
  2. Bob matches 1 order.
  3. Charlie has no orders, so he gets a NULL.
SELECT users.name, orders.item 
FROM users 
LEFT JOIN orders ON users.id = orders.user_id;

Task: Run the query to see the actual results match the animation!

Loading...
Run a query to see results