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-2
Your Progress

The INNER JOIN

An INNER JOIN returns only the records that have matching values in both tables.

Unlike LEFT JOIN, rows without matches are excluded from the result.

Key Difference:

  • LEFT JOIN: Returns all rows from left table, even without matches
  • INNER JOIN: Returns only rows that have matches in both tables
SELECT users.name, orders.item 
FROM users 
INNER JOIN orders ON users.id = orders.user_id;

Task: Run the query and notice that Charlie is NOT in the results (he has no orders).

Loading...
Run a query to see results