R4R Team working to provide free of cost for experienced and freshers

Tutorials | Examples|Interview Questions and Answers|Java Tutorials| C Tutorials | C++ Tutorials | Spring Tutorials| Hibernate Tutorials | JSP Tutorials | Servelets Tutorials| C# Tutorials | PHP Tutorials etc , Basics | Download Software | Data Types | Variables | Constant | Storage & Classes | Operators | Decisions Making | Loops | Functions| Numbers | Arrays | Pointers | String | Datastructure | Expressions | Preprocessor Statement | I/O | Exception Handling | OOPs Tutorial | Classes and object |C++ Inheritance Overloading | Polymorphism | Abstraction | Encapsulation | Interfaces | Multithreading etc


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


FROM sales CROSS JOIN publishers


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

Previous Home Next