At 13:22 +0100 6/26/02, Simon Green wrote: >Hi >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? >Thanks >Simon
What do you mean by "distinct match"? Your != query is effectively a cartesian product that retrieves all but the diagonal elements of the matrix. --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php