假设您有一个包含两个(或更多)列的表,这些列链接到另一个表:
house_history houses
--------------- --------
OwnerID HouseID
PreviousHouseID Address
CurrentHouseID
并且您想从这些 ID 中的每一个返回数据:
---------------------------------------------------------------
|OwnerID| PreviousAddress | CurrentAddress |
---------------------------------------------------------------
(linked to PreviousHouseID) (linked to CurrentHouseID)
你会怎么做呢?(特别是我对使用 MySQL 很感兴趣)