I Have 3 Tables with foreign keys to each other.
I want to write a SQL Server Stored Procedure to select records from one of them.
Now, let's suppose that i want all the Winner records referring to the Player records referring to The Game with the ID=2, how can i proceed?
you have specified all the Winner records So that i have used the left join for player and game. But the Overall code works according to the where condition.
select w.* from Winner w left Join Player p on p.ID_player = w.player_FK left join Game g on g.ID_game = p.Game_FK where Game.ID_game = 2