Use of Cartesian Product in SQL
What is Cartesian Product in SQL ?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Rajeev KumarPosted Feb 27, 2023, 5:52 AM
Cartesian product returns a number of rows from 1st * 2nd Table.
if the first table has 20 rows and the second table has 3 rows, then result will be 20 * 3 = 60 rows. Cartesian Product is also well known as Cross Join. We write a syntax as below--
SELECT * FROM Tbllecture
CROSS JOIN Tblteacher
Jignesh TrivediPosted Oct 30, 2012, 3:01 AM
The Cartesian product returns a number of rows equal to the product of all rows in all the tables being joined.
example
if the first table has 10 rows and the second table has 5 rows, the result will be 10 * 5 = 50 rows.
it also known as cross join
Please refer
http://msdn.microsoft.com/en-us/library/ms190690%28v=sql.105%29.aspx
Sandeep Singh ShekhawatPosted Oct 30, 2012, 12:34 AM
Suppose we have 2 row in firts table and 3 row in second table then 2*3 =6 rows will be display
Like
SELECT * FROM COURSE