Subtracting Joins
Moderator: General Moderators
Subtracting Joins
How can I do a Join that if the id's are the same those with equal id's won't display.
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
[mysql_man]left join[/mysql_man]
or similar....
Code: Select all
SELECT * FROM table1 LEFT JOIN table2 ON table2.id = table1.id WHERE table2.id IS NULLI though what you asked was somehting like
mhh it might not even work.. as a rules of thumb.. ALWAYS follow feyd advices 
Code: Select all
SELECT * FROM table1, table2 WHERE t1.id <> t2.id- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
viewtopic.php?t=24104&highlight=left+join+null
may help point out what's the deal with it..
may help point out what's the deal with it..