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
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
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
Summary: The answer is that I need to use a LEFT OUTER JOIN, such as the following: SELECT t.*, r.rating FROM phpbb_topics t LEFT OUTER JOIN phpbb_rate_results r ON t.topic_id = r.topic_id WHERE t.forum_id = 2...
Summary: let say I have 2 tables like this: Table A lapID | os | model 23 | s | te 53 | d | ye 34 | te | ye 33 | et | ey Table B lapID | sth | sth 23 | st | sy I'd like to display a result th...
Summary: Hi, I was wondering if anyone could help me out with this one. I have created a simple query that has to search a variety of checkboxes. For example, the user has to be able to check the builder AND...