What type of join is this? [duplicate]
Possible Duplicate:
How does SELECT from two tables separated by a comma work? (SELECT * FROM T1, T2)
Here's some SQL:
SELECT * FROM t1,t2开发者_JAVA百科
What kind of join is that?
Thanks,
Jim
Cartesian product of the 2 tables...
It's a no join :)
Actually is known as a Cross join, or a Carthesian product of two tables.
This will return all the rows in the first table, joined with all the rows in the second table, so the returned number of rows will be a product of the numbers of rows of the first and the second table.
This syntax is great if you need to generate a large volume of data, as joining just 4 tables with 100 records each will yield 100.000.000 records, however, can be quite irritating if you do it by accident.
精彩评论