View Single Post

   
  #2 (permalink)  
Old 02-28-2008, 08:13 AM
Captain Paralytic
 
Posts: n/a
Default Re: Joining 2 columns from the same table


Nicos wrote:
> Hello,
> i have a table (Matches) than have the columns listed below:
> matchId, homeTeam, awayTeam, result
>
> I want to list all the teams DISTINCT both home and away teams.
> How do i do that?
>
> Best regards,
> Nicos


Are you looking for something like:

SELECT homeTeam FROM matches
UNION
SELECT awayTeam FROM tmatches

Reply With Quote