MySQL Forums
Forum List  »  Newbie

Re: Difficulty framing a JOIN statement
Posted by: laptop alias
Date: April 15, 2012 07:42AM

Shows (showId, showName....)
People (personId, personName...)
PeopleInShows (showId,personId,roleNo) 

SELECT p.personName
     , r.role
  FROM peopleinshows ps
  JOIN people p
    ON p.personid = ps.personid
  JOIN roles r
    ON r.roleno = ps.roleno
 WHERE ps.showid = $idno;

Options: ReplyQuote

Written By
Re: Difficulty framing a JOIN statement
April 15, 2012 07:42AM

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.