我有三张桌子:Players、PlayersArchive、Races。Players 和 PlayersArchive 表的结构完全相同。
在 Players 和 PlayersArchive 中,我们有 PlayerID 和 Name。
在 Races 中,我们排成一行:
RaceID、Record1PlayerID、Record2PlayerID、Record3PlayerID、Record4PlayerID 和 Record5PlayerID
任务是选择整个 Races 表,但它应该返回他们的名字而不是玩家 ID 字段。
例如:
Races table:
RaceID: 1
Record1PlayerID: 2
Record2PlayerID: 1
Record3PlayerID: 0
Record4PlayerID: 0
Record5PlayerID: 0
Players table:
PlayerID: 1
Name: Jhon
PlayersArchive table:
PlayerID: 2
Name: Jack
result:
1 Jack Jhon NULL NULL NULL