Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Using INNER JOIN Query for More than Two tables

Author  Topic 

sr_aneesh
Starting Member

17 Posts

Posted - 2006-04-09 : 05:38:08
I normally use simple join for joining two or more tables. i would like to know how do i join more than two tables using INNER JOIN.


what will the INNER JOIN Query for :

select a.FirstName,a.Age,b.Title,c.Address from Candidate a, Deatails b, Address c where a.UserId=b.CandidateId and a.UerId=C.UserId


Thanx in Advance

chiragkhabaria
Master Smack Fu Yak Hacker

1907 Posts

Posted - 2006-04-09 : 05:49:31
Somthing like this

select a.FirstName,a.Age,b.Title,c.Address from Candidate a Inner Join Deatails b On a.UserId=b.CandidateId
Inner Join Address c On a.UerId=C.UserId


Look out in Book online for more details about other type of joins..

If Debugging is the process of removing Bugs then i Guess programming should be process of Adding them.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-04-10 : 03:19:52
You need to make use ANSI style joins. Read about Joins in sql server help file

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -