MS Access 2013:多次连接表

问题描述

我对 MS Access 完全陌生,所以如果我的请求看起来毫无意义,请善待。 我有一个包含两个表的数据库tblHerbstblSeasons。 tblHerbs 中的两个字段是指 tblSeasons,我不知道如何设置这两个表之间的关系,除了构建一个简单的查询,允许我从 tblHerbs 中选择所有内容(并在报告中显示)。

enter image description here

任何形式的帮助将不胜感激。

解决方法

你需要别名

select t.Season1,s1.name,t.Season2,s2.name
from  ((tblHerbs t
inner join tblSeasons s1 on s1.name= t.Season1 )
inner join tblSeasons s2 on s2.name= t.Season2)