Back to Yugabyte Db

CROSS JOIN

community/learn/content/01-SQL-Basics/03-joins/04-cross-join.md

2026.1.0.0-b25335 B
Original Source

SELECT with a CROSS JOIN

In this exercise we will query the customers table using a CROSS JOIN with the suppliers table.

SELECT customers.customer_id,
       customers.contact_name,
       suppliers.company_name,
       suppliers.supplier_id
FROM customers
CROSS JOIN suppliers;

The query should return 2,639 rows.