MySQL Forums
Forum List  »  Newbie

query help for a noob
Posted by: rich banke
Date: May 15, 2005 10:02PM

Hello, I am just starting to learn how to interact with mysql. This seems like a very simple query however all the examples ive seen just dont seem to work out for me. Here is my problem, I have 2 tables each with a column named 'charname' table1 is a complete list of users, table2 is a list of currently online users. I want to run a query that will tell me which users in table2.charname are also in table1.charname. I have tried several ways of using a left join and the only results i have been able to retrieve is a complete list in table1.

'select table1.charname from table1 left outer join table2 on table1.charname = table2.charname where table2.charname is null'

this is only 1 of the examples ive tried.
thanks for any help
-Rich

Options: ReplyQuote


Subject
Written By
Posted
query help for a noob
May 15, 2005 10:02PM
May 16, 2005 12:36AM
May 16, 2005 12:56AM
May 16, 2005 03:03AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.