我有一行,其中两个不同的团队用他们的 ID 和名称替换。我想在下拉列表中显示它们。为此,我需要以一种在另一个之上的格式显示它们。这是我的查询和图像是我得到的当前结果..
SELECT Match_Schedule.Match_Serno as 'Id', FirstHomeTeam.Serno as 'HomeTeamID', FirstHomeTeam.Team_Name as 'HomeTeam',SecondHomeTeam.Serno as 'AwayTeamID',SecondHomeTeam.Team_Name as 'AwayTeam'
FROM Match_Schedule
INNER JOIN Team_Detail AS FirstHomeTeam ON Match_Schedule.HomeTeam = FirstHomeTeam.Serno
INNER JOIN Team_Detail AS SecondHomeTeam ON Match_Schedule.AwayTeam = SecondHomeTeam.Serno
where Match_Serno=436
我得到的结果是
但我想要的结果是。
谢谢你。