Multiple join query

April 7, 2009 at 00:05:31
Specs: Windows XP
How can we use multiple join query when we have to use it with different table.In using multiple join we write the joining condition taking first table in the sequence as refrence. But if in the joining conditions we have to use different tables then how to write such query.
Can we write the query like this :
Eg. select t1.firstname,t2.lastname,t3.address,
from table1 t1 inner join table2 t2
on t1.row_id=t2.row_id
inner join table3 t3
on t2.row_id=t3.row_id

See More: Multiple join query

Report •

April 7, 2009 at 01:29:57
i think should be something like this:

select t1.firstname,t2.lastname,t3.address,
from tabel3 t3 inner join (table1 t1 inner join table2 t2
on t1.row_id=t2.row_id)
on t3.row_id=t1.row_id

Report •
Related Solutions

Ask Question