MySQL Forums
Forum List  »  Newbie

How to recuperate data from other records in the same table
Posted by: Gary Andrews
Date: February 27, 2016 04:37PM

I have a table 'dogs' containing the following columns:

dog_id
dog_name
dob
sire_id
dam_id
etc

I'm intending to provide users with a search form on various fields (eg dog_name, dob etc) and display the output in a table.
How do I retrieve the names of each of the parents from the row corresponding to the dog_id held in sire_id and dam_id.

Should I be looking at subqueries, views or creating temp tables.

All suggestions gratefully accepted.

Options: ReplyQuote


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


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.