Contents Index Displaying a list of tables Using the ON phrase to restrict a join

ASA Getting Started
  Selecting Data from Multiple Tables

Joining tables using the cross product


One of the tables in the sample database is sales_order, which lists the orders placed to the company. Each order has a sales_rep column, containing the employee ID of the sales representative responsible for the order. There are 648 rows in the sales_order table and 75 rows in the employee table.

The cross product join is a simple starting point for understanding joins, but not very useful in itself.

List all data in the employee and sales_order tables

Subsequent sections describe how to construct more selective joins. The more selective joins can be thought of as applying a restriction to the cross product table.

For more information, see Cross joins.


Contents Index Displaying a list of tables Using the ON phrase to restrict a join