MySQL Forums
Forum List  »  Newbie

Re: problem selecting from one table where not in another
Posted by: Israel Iglesias
Date: January 26, 2012 03:20AM

I see... because the players table does not hold the league id (only the user_players and transfer_list) then I probably should do this:

SELECT lp.*
  FROM league_player lp
  LEFT
  JOIN user_league_player ulp
    ON ulp.league_player_id = lp.league_player_id
   AND ulp.league_id = 101
  LEFT
  JOIN transfer_list tl
    ON tl.league_player_id = lp.league_player_id
   AND tl.league_id = 101
 WHERE lp.level = 1
   AND ulp.league_player_id IS NULL
   AND tl.league_player_id IS NULL;

Options: ReplyQuote


Subject
Written By
Posted
Re: problem selecting from one table where not in another
January 26, 2012 03: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.