select
Date, Home, Away, Umpire
from
Match
join
Team on Match.Home = Team.TeamId
join
Team as T on Match.Away = T.TeamId
join
Umpire on Match.Umpire = Umpire.UmpireId
我首先尝试将Team
和Umpire
表与Match
联系起来,因为我使用了Team
两次而收到错误,所以我创建了一个别名{ {1}}。但是当我执行此操作时,我只是将T
表作为输出。
您认为问题是什么?
答案 0 :(得分:0)
以防你没有得到@vkp指出的内容:
select
Match.*, Team.*, T.*, Umpire.*
from
Match
join
Team on Match.Home = Team.TeamId
join
Team as T on Match.Away = T.TeamId
join
Umpire on Match.Umpire = Umpire.UmpireId