Reprence Html CSS javascript PHP MySQL Bootsrap

SQL CROSS JOIN Keyword

The CROSS JOIN keyword returns all records from both tables (table1 and table2).

96

CROSS JOIN Syntax

97 98

Demo Database

In this tutorial we will use the well-known Northwind sample database.

Below is a selection from the "Customers" table:

99

And a selection from the "Orders" table:

100


MySQL CROSS JOIN Example

The following SQL statement selects all customers, and all orders:The following SQL statement selects all customers, and all orders:


101