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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

joining 3 table

Status
Not open for further replies.

rbauerle

Programmer
Oct 16, 2001
48
BR
could anyone show me an example of joining 3 tables??? I try to do it, but it won´t work.

Thanx
 
Sure. Here's an example.

Table: customer
Fields:
custid
custname
custcity


Table: site
Fields:
custid
siteid
sitename
sitecity


Table: user
Fields:
siteid
userid
firstname
lastname


Code:
SELECT customer.customername, site.sitename, user.firstname, user.lastname FROM customer, site, user WHERE user.siteid=site.siteid AND site.custid=customer.custid

ToddWW
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top