Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Join 3 tables

Status
Not open for further replies.

Awuah

Programmer
May 22, 2002
7
US
what is the syntax for joining 3 tables on a primary key that is present in all three tables.

Thank you.
 
This is a basic Equi-Join:

Select * from Table1
join table2
on table1.key = table2.key
join table3
on table1.key = table3.key

If you want all rows from one of the tables then you want to do an outer join.

Good Luck!
 
Thank you MeanGreen. I appreciate your help. It worked.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top