我有三个表senderTable、recieverTable和一个mapTable。我正在尝试编写查询以获取senderName和recieverName的输出
发件人表
senderID
senderName
接收者表
recieverID
recieverName
地图表
mappingID
senderID
recieverID
我有以下查询不起作用,因为我不知道如何在其中合并映射表。
SELECT t_senderTable.nameFull AS "senderName", t_recieverTable.recieverName AS "recieverName"
FROM ((dbo.t_senderTable AS t_senderTable
INNER JOIN t_senderTable AS t_senderTable ON (t_senderTable.Kd = mapTable.senderID))
INNER JOIN t_recieverTable AS t_recieverTabler ON (recieverTable.Id = mapTable.recieverID ))
有什么想法可以做对吗?谢谢