Avatar of al4629740
al4629740
Flag for United States of America asked on

selecting from three or more relational tables

I have Three tables in SQL 2012.  They are related in the following scheme below.

tblGoals
GoalID - Primary Key

tblObjectives
GoalID- Foreign Key
ObjectiveID- Primary Key

tblPI
ObjectiveID- Foreign Key
PIID-Primary Key

 If I would like to call all the records between all the tables (ie, Goals, related Objectives, related PI, how would I select them all?

Would it look like this?


Select *
From tblGoals G
Inner Join tblObjective O on G.GoalID = O.GoalID Inner Join ????

You see where I am struggling....
Microsoft SQL Server

Avatar of undefined
Last Comment
Steve Wales

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Steve Wales

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23