Re: Help with Cartesian product

From: Earl Lewis <elewis_at_virtual.com>
Date: 23 Sep 2002 10:20:43 -0700
Message-ID: <d2d2cde1.0209230920.4b1bcb92_at_posting.google.com>


"BackAt-Ya" <princem3_at_hotmail.com> wrote in message news:<gNvj9.24011$7J2.671164_at_news4.srv.hcvlny.cv.net>...
> What's a Cartesian product and why or why wouldn't I want to use one?
> Please give me some examples.
>
> Reply here or to princem3_at_hotmail.com
>
> --

A Cartesian product is the result of querying two or more tables in one select statement without specifying any joins between the tables. If you have 10 records in one table and 4 records in the other 'unjoined' table your result will be 40 records, in other words, the product of the total number of records in each table.

As you can imagine this is useful if you want to see every combination of possibilities for the data in two or more tables. Otherwise, this is never used.

Earl Lewis Received on Mon Sep 23 2002 - 19:20:43 CEST

Original text of this message