MySQL Forums
Forum List  »  Newbie

Re: How to recuperate data from other records in the same table
Posted by: J Scavok
Date: February 27, 2016 06:43PM

Try this (overly verbose) query:

SELECT `mydb`.`dogs`.`dog_name`,
`mydb`.`sires`.`sire_name`,
`mydb`.`dams`.`dam_name`

FROM `mydb`.`dogs`, `mydb`.`sires`, `mydb`.`dams`

WHERE `mydb`.`dogs`.`sire_id` = `mydb`.`sires`.`sire_id`

AND `mydb`.`dogs`.`dam_id` = `mydb`.`dams`.`dam_id`;

Options: ReplyQuote


Subject
Written By
Posted
Re: How to recuperate data from other records in the same table
February 27, 2016 06:43PM


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.