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 7: Advanced Joins
7-1
Your Progress

CROSS JOIN

A CROSS JOIN returns the Cartesian product of two tables - meaning it combines every row from the first table with every row from the second table.

SELECT * FROM colors CROSS JOIN sizes;

If table A has 3 rows and table B has 4 rows, the result will have 3 x 4 = 12 rows.

Task: Generate all possible combinations of shirts and pants.

Loading...
Run a query to see results