JOIN problem
| From: | Zouari Fourat | Date: | Mon, 07 Feb 2005 18:22:15 +0000 |
| Subject: | JOIN problem | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-38501@lists.php.net to get a copy of this message | ||
Hello
I have 2 tables with two columns in each one (cloned tables) like this :
ID int(6)
UserName varchar(25)
and i would like to select usernames from table1 that doesnt appear in table2
so i did this :
SELECT a.UserName FROM table1 a RIGHT OUTER JOIN table2 b ON
(a.UserName = b.username)
and that wont work, as i saw from sql joint docs, using OUTER JOIN
significate that we want to join the 2 tables where the inverse of
(a.UserName=b.username) is, so it's equivalent of
(a.UserName<>b.username) and the LEFT option is about to show the
lines from the left side table wich is a (table1) in my query
why didnt that work fine ? how to resolve it and is my view on sql
joins is incorect ?
thanks all