I am having trouble getting the correct join...here is my scenario.
I have 2 tables, A and B.
A looks something like this...
[id]    [name]
1        Name1
2        Name2
3        Name3

B looks like this...
[userid]    [tableAid]
1                1
1                3
2                1
2                2

I am looking for a join that will return only the items NOT found in table B
from table A.  In this example, it would return 2/Name2 from table A for
userid 1.

This is my current statement:
select id, name from A left join A on A.id=B.tableAid where B.userid=1;

This gives me just the opposite of what I want.




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to