以下可能吗?
我有 2 张桌子,例如:
地点:
Location_key | Location | Site_key
1 | First Floor | 100
2 | Second Floor | 100
3 | Third Floor | 100
4 | Fourth Floor | 200
5 | Fifth Floor | 200
子位置:
Sub_Location_key | Sub_Location | Location_key
1 | Room A | 1
2 | Room B | 2
3 | Room C | 3
4 | Room D | 1
5 | Room E | 2
我想获取每个位置内的所有子位置。因此,例如,如果我获得站点 100,我需要返回如下内容:
First Floor
----------
Room A
Room D
Second Floor
----------
Room B
Room E