Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
- FROM matches
- INNER JOIN teams AS team1 ON matches.home_id = team1.id
- INNER JOIN teams AS team2 ON matches.away_id = team2.id
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement