Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.28 KB | None | 0 0
  1. SELECT matches.id AS matchId, matches.home_id, matches.away_id, team1.id AS home_id, team1.name AS home_name, team2.id AS away_id, team2.name AS away_name
  2. FROM matches
  3. INNER JOIN teams AS team1 ON matches.home_id = team1.id
  4. INNER JOIN teams AS team2 ON matches.away_id = team2.id
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement