Guest User

Untitled

a guest
Dec 14th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. Table: team_players
  2.  
  3. | id | team_id | player_id |
  4. ----------------------------
  5. 1 1 1
  6. 2 1 2
  7. 3 2 1
  8. 4 2 2
  9. 5 2 3
  10.  
  11.  
  12. I have 2 player_ids, 1 and 2.
  13. I want a query that tells me if that team already exists. (team_id 1 in the example above)
  14. Note that the same players can be on another team with more players (with player 3).
Add Comment
Please, Sign In to add comment