mysql - After I Join with same table twice then how to call value with same column name in WHERE clause? -


i'll start example:

*table1* id phonenumber1 phonenumber2  *table2* phonenumber someotherfield  select * table1 t1 inner join table2 t2    on t2.phonenumber = t1.phonenumber1 inner join table2 t3    on t3.phonenumber = t1.phonenumber2 -- here question how call same column have same name? -- want clause below: someotherfield(from first table2) = someotherfield(from second table2) 

the example below question, asking different things: what's best way join on same table twice?

where t2.someotherfield = t1.someotherfield 

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -