List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:June 27 2002 4:00am
Subject:Re: Cartesian Product
View as plain text  
At 13:22 +0100 6/26/02, Simon Green wrote:
>When I run my MySQL question I get what I think is a cartesian product?
>SELECT table1,Username
>FROM table1, table2
>WHERE table1.Username != table2.Username;
>If I just run'=' then no problem but it seems to what to match every thing
>with every thing
>and so I run out of memory.
>Is there a way to do a distinct match?

What do you mean by "distinct match"?

Your != query is effectively a cartesian product that retrieves all but the
diagonal elements of the matrix.
Cartesian ProductSimon Green27 Jun
Re: Cartesian ProductPaul DuBois27 Jun