Computing.Net > Forums > Programming > Multiple join query

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Multiple join query

Reply to Message Icon

Name: saket
Date: April 7, 2009 at 00:05:31 Pacific
OS: Windows XP
Subcategory: Opinions
Comment:

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,t4.country
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



Sponsored Link
Ads by Google

Response Number 1
Name: reno
Date: April 7, 2009 at 01:29:57 Pacific
Reply:

i think should be something like this:

select t1.firstname,t2.lastname,t3.address,t4.country
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


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Multiple join query

Need help with an SQL join query www.computing.net/answers/programming/need-help-with-an-sql-join-query/13358.html

mysql query www.computing.net/answers/programming/mysql-query/11751.html

Multiple checkbox query in Access 2000 www.computing.net/answers/programming/multiple-checkbox-query-in-access-2000/2268.html