CROSS JOIN

A cross join returns the Cartesian product of all the rows in all the tables.
A cross join produces results that consist of every combination of rows from the two tables.


SELECT       Customers.CustomerID 
             ,Invoices
FROM CUSTOMERS
CROSS JOIN Invoices

This is the result of joining two tables with no join condition.
Each row in one table is matched with each row in the other table.
These joins are almost never used, except to generate all possible combinations of records from tables that do not share a common element.


Cross Tab Query
You must use the GROUP BY in a cross tab query
Access has the keyword "CROSSTAB"


A cross join returns the Cartesian product of all the rows in all the tables.
This is the result of joining two tables with no join condition. Each row in one table is matched with each row in the other table.
These joins are almost never used, except to generate all possible combinations of records from tables that do not share a common element.


ANSI Standard (not supported in Access)

SELECT       * 
FROM Customers
CROSS JOIN Orders

Alternative

SELECT       Customers.* 
             ,Orders.*
FROM Customers
             ,Orders

© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext