Membership
Main Menu
Forum Boards
Stats
- 18 tutorials
- 72,291 members
- 695,913 forum posts
- 11 blog posts
Tutorials
Data Joins Unions
by Barry Andrew on Jun 30, 2008 5:59:59 PM
Views: 21979
Cartesian join
This is not a join you will you use very often (although you may use one accidentally, especially when using the FROM A,B syntax for your inner joins and forgetting to put the join condition in the WHERE clause) but it does have its practical uses, as we shall see in the sample application at the end of this tutorial. (Another practical use is generating data)
A cartesian join is produced by omitting the join condition a join. In this case, every row in the first table is joined with every row in the second. For example, we'll just count the number of rows returned rather than list them (for obvious reasons)
Result
+-------+ | total | +-------+ | 19440 | 24 pupils * 81 choices * 10 subjects +-------+
Now we will look at UNIONS
Comments
1. Tom Butterworth on Jul 1, 2008 6:20:06 PM
2. swatisonee on Jul 3, 2008 4:07:11 AM
3. Daniel Egeberg on Jul 3, 2008 5:45:05 AM
4. swatisonee on Jul 4, 2008 4:38:28 AM
Login or register to post a comment.
