Sorry I should have made this a bit clear.
I have to tables with users names in them. 
All I need is a list on the Usernames that are in one column but not the
other.
The problem is like Mr DuBois said, is that I get every possible match like
a matrix (I think?).
So how do I get the values that are just not it one column?

Thanks
Simon

-----Original Message-----
From: Paul DuBois [mailto:[EMAIL PROTECTED]]
Sent: 27 June 2002 05:00
To: Simon Green; Mysql (E-mail)
Subject: Re: Cartesian Product


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

---------------------------------------------------------------------
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

Reply via email to