MySQL Forums
Forum List  »  Newbie

Re: How to recuperate data from other records in the same table
Posted by: Gary Andrews
Date: February 28, 2016 09:20AM

Thanks for your suggestions, after quite a bit of fiddling about I did get the required results with the following command:

SELECT offspring.dog_id, offspring.dog_name, offspring.dob, offspring.sire_id, offspring.dam_id, sire.dog_name, dam.dog_name
FROM dog AS offspring
JOIN dog AS sire ON sire.dog_id = offspring.sire_id
JOIN dog AS dam ON dam.dog_id = offspring.dam_id;

Options: ReplyQuote


Subject
Written By
Posted
Re: How to recuperate data from other records in the same table
February 28, 2016 09:20AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.