[thelist] [mysql] join

Tab Alleman Tab.Alleman at MetroGuide.com
Wed Jan 28 10:00:07 CST 2004


Joshua Olson wrote:
> Kris,
> 
> Here's an explanation of what I meant:
> 
> You can perform a double inner join on table two thusly:
> 
> SELECT some_other_stuff, t1.name AS name1, t2.name AS name2
> FROM table_one
> INNER JOIN table_two t1
> ON t1.id = table_one.id_one
> INNER JOIN table_two t2
> ON t2.id = table_one.id_two

Does MySQL not support "OR" operators in the Search condition of a JOIN?

Could one not do:

> SELECT some_other_stuff, t1.name AS name1, t2.name AS name2
> FROM table_one
> INNER JOIN table_two t1
> ON t1.id = table_one.id_one
> OR t2.id = table_one.id_two

?



More information about the thelist mailing list