Это может помочь вам
DECLARE @Team TABLE
(
TeamID INT ,
TeamName VARCHAR(50),
CoachID INT
)
DECLARE @Fixture Table
(
FixtureID INT,
Venue VARCHAR(50),
Team1 INT ,
Team2 INT,
FixtureDate DATE
)
INSERT INTO @Team(TeamID,TeamName,CoachID) VALUES(1,'A',1)
INSERT INTO @Team(TeamID,TeamName,CoachID) VALUES(2,'B',2)
INSERT INTO @Team(TeamID,TeamName,CoachID) VALUES(3,'C',3)
INSERT INTO @Team(TeamID,TeamName,CoachID) VALUES(4,'D',4)
INSERT INTO @Fixture(FixtureID,Venue,Team1,Team2,FixtureDate) VALUES(1,'X',1,3,GETDATE())
INSERT INTO @Fixture(FixtureID,Venue,Team1,Team2,FixtureDate) VALUES(2,'Y',2,4,GETDATE())
SELECT
f.FixtureID,
f.Venue,
t1.TeamName Team1,
t2.TeamName Team2,
f.FixtureDate
FROM @Fixture f
Inner Join @Team t1 ON f.Team1 = t1.TeamID
Inner Join @Team t2 ON f.Team2 = t2.TeamID