Say that you have a table with two (or more) columns which link to another table:
house_history houses
--------------- --------
OwnerID HouseID
PreviousHouseID Address
CurrentHouseID
and you wanted to return data from each of those IDs:
---------------------------------------------------------------
|OwnerID| PreviousAddress | CurrentAddress |
---------------------------------------------------------------
(linked to PreviousHouseID) (linked to CurrentHouseID)
How would you go about doing that? (specifically I’m interested in using MySQL)
1 Answer