User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MySQL section within the Web Development category of DaniWeb, a massive community of 361,561 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,015 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MySQL advertiser:
Views: 7741 | Replies: 1
Reply
Join Date: Oct 2004
Location: you don't want to know
Posts: 2
Reputation: whatsgoin'on is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
whatsgoin'on's Avatar
whatsgoin'on whatsgoin'on is offline Offline
Newbie Poster

Join in a SQL Query

  #1  
Dec 1st, 2004
I'm new to SQL and was wondering how exactly do i use the join in a query.
i have 3 tables, with the primary keys from the first two tables acting as keys for the third table. I have to get information from the first and third tables but need to use the second table to get the information.
thanks to anyone who helps
You'll have to speak up- I'm wearing a towel!
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Dec 2004
Location: Singapore
Posts: 44
Reputation: starsunited is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 1
starsunited's Avatar
starsunited starsunited is offline Offline
Light Poster

Re: Join in a SQL Query

  #2  
Dec 9th, 2004
Originally Posted by whatsgoin'on
I'm new to SQL and was wondering how exactly do i use the join in a query.
i have 3 tables, with the primary keys from the first two tables acting as keys for the third table. I have to get information from the first and third tables but need to use the second table to get the information.
thanks to anyone who helps

well.. for example...

select a.name, c.address from table1 a , table2 b, table3 c where a.memberid = c.memberid and b.deptid = c.deptid.

in this sql statment, table1,table2,table3 is joined together to retrieve the name and address from two tables using the second table. do u understand?
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb MySQL Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the MySQL Forum

All times are GMT -4. The time now is 2:35 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC