Skip to content

CROSS

SELECT Orders.OrderID, Customers.CustomerName, Orders.OrderDate
FROM Orders
CROSS JOIN Customers
LIMIT 5;
| OrderID | CustomerName | OrderDate |
|---------|--------------|-----------|
| 1 | Antonio | 2020-07-07|
| 2 | Maria | 2020-08-10|
| 3 | Carlos | 2020-07-15|
| 4 | Juan | 2020-08-20|
| 5 | Ana | 2020-07-22|

The given SQL query demonstrates the use of the CROSS JOIN clause. CROSS JOIN returns the Cartesian product of rows from the tables involved in the join. The resulting table will have rows that combine each row from the first table with each row from the second table. The LIMIT 5 clause limits the result to the first five records.