MySQL Forums
Forum List  »  Newbie

Inner Join question
Posted by: ivan haentjens
Date: August 19, 2005 11:25AM

I'm having some problems writing a query for two joined tables:

Table 'persons':

- PersonId (PK)
- PersonFirstName
- PersonLastName

Table 'hobbies'

- HobbyId (PK)
- PersonId (FK)
- HobbyDescription

Now, let's say person 'John Doe' has several hobbies
like chess, walking, jogging ...

I want to select all persons with last name 'Doe' and
hobbies chess AND walking.

It's the combination of the two hobbies that's giving me
problems. Does anybody knows how to do this?

Thank you.
Ivan.

Options: ReplyQuote


Subject
Written By
Posted
Inner Join question
August 19, 2005 11:25AM
August 19, 2005 11:35AM


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.