Skip to main content

SQL Fundamentals

SQL Joins

0:00
LearnStep 1/2

SQL Joins

SQL Joins

Sample Tables

INNER JOIN

Returns only matching rows from both tables:

sql

LEFT JOIN (LEFT OUTER JOIN)

All rows from left table, matching from right:

sql

RIGHT JOIN

All rows from right table, matching from left.

FULL OUTER JOIN

All rows from both tables:

sql

CROSS JOIN

Cartesian product (all combinations):

sql

Self Join

sql