Interview Questions   Tutorials   Discussions   Programs   

DB2 - What is a Cartesian product?

asked mar August 21, 2014 01:03 PM  

What is a Cartesian product?


1 Answers

answered By Mswami   0  
The CARTESIAN JOIN or CROSS JOIN returns the Cartesian product of the sets of records from the two or more joined tables. Thus, it equates to an inner join where the join-condition always evaluates to True or where the join-condition is absent from the statement.

Syntax is as follows:

SELECT table1.column1, table2.column2...
FROM table1, table2 [, table3 ]

The Cartesian product returns a number of rows equal to the product of all rows in all the tables being joined. For example, if the first table has 20 rows and the second table has 10 rows, the result will be 20 * 10, or 200 rows.
   add comment

Your answer

Join with account you already have



 Write A Tutorials
Online-Classroom Classes

  1 person following this question

  1 person following this tag

  Question tags

Asked 2 years and 3 months ago ago
Number of Views -359
Number of Answers -1
Last updated
3 years and 3 months ago ago

  Similar questions

Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!