Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Help with Cartesian product
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 - 13:19:10 CDT
![]() |
![]() |