On Thu, 27 Jun 2002 09:01:58 +0100
Simon Green <[EMAIL PROTECTED]> wrote:

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

Use Left Join Syntax .... 

>SELECT table1,Username
>FROM table1, table2
>WHERE table1.Username != table2.Username;


select table1.username from table1 left join table2 on table1.username=table2.username 
where table2.username is null
(for finding exist on table1 not in table2)

and vice versa .... ;-)



-- 
Linux: Where Don't We Want To Go Today?
        -- Submitted by Pancrazio De Mauro, paraphrasing some well-known sales talk

sql,query

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