Re: Help with Cartesian product

From: Ahmed Baraka <baraka_at_khawarizmi.com>
Date: Tue, 1 Oct 2002 11:19:10 -0700
Message-ID: <anbia3$bmq7_at_news.emirates.net.ae>


As an example of what Lewis said:

SELECT E.ENAME, D.DNAME
               FROM EMP E, DEPT D;
This select statement produces cartesian product.

"Earl Lewis" <elewis_at_virtual.com> wrote in message news: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 Tue Oct 01 2002 - 20:19:10 CEST

Original text of this message