Exploring FULL OUTER and CROSS Joins

Published July 26, 2025 By Sai Sree Ram Gundepudi

FULL OUTER JOIN (Using UNION)

(SELECT * FROM a LEFT JOIN b ON a.id = b.id)
UNION
(SELECT * FROM a RIGHT JOIN b ON a.id = b.id);

CROSS JOIN

SELECT * FROM sizes CROSS JOIN colors;

This returns all combinations (Cartesian product).

Was this solution helpful?

Your feedback helps improve our technical knowledge repository.

Share this article