DATABASE & SQL/PLSQL

Cross Join
Previous Home Next

A join that included more than one table using keyword CROSS is called cross join.

The output of a such type of join is called Cartesian product.

In cross join each row of first table is joined to with the each row of second table.

The number of rows in the result set is the multiple of the first table rows and second table rows.

SELECT  column_name 1, column_name 2....column_name n
FROM  table_name  CROSS JOIN  table_name

 

Example:

SELECT *
FROM sales CROSS JOIN publishers

output

returns 168 rows, after cross join 21 rows of sales table and 8 rows of publishers tables.

Previous Home Next

Tolal:0 Click:

Show All Comments

Did not find what you were looking for leave your name and message. We will revert within 24 hours
Name:
eMail:
Comment / Feedback: