lapucca
asked on
How to easily create a select statement inner join 20 tables/
Hi, Is there a easy way to create a select statement that involves about 20 tables in a database? In table0 I want to select everything. Using the Id column in table0 I want to join that with rest of the table1-table20 which all have a id column as well. I want all columns of table0 even if there is no match in any of the other table. From Table1 - table20, I only want the column Name if the Id column is a match for the table 0. Can someone show how this select query would look like? Also, there is a lot of columns in table0, is there any way to specify to return all columns form table0 during a join? I used to use Query AnalyZer but it's no longer avaialble in 2005. Very annoying.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
if there is no match, use indeed LEFT JOIN instead of simply JOIN.
yes, you have to use LEFT JOIN. check my post.
ASKER
thank you.
ASKER