SELECT DISTINCT Colour
FROM tablename
Peter
On 14/02/2008, Richard <mysql_list@stripped> wrote:
>
> Hello,
>
> I don't know if it is possible to do this with mysql alone ...
> Here goes :
> I've got a database list which is like to following :
>
> Num | Name | Colour
> -------------------------------------------
> 1 | Harry | Red
> 2 | Tom | Blue
> 3 | Jane | Green
> 4 | Philip | Red
> 5 | Sarah | Red
> 6 | Robert | Blue
>
>
> And from this table I wish to get a list of used colours.
>
> The correct answer would be :
>
> Colour
> ---------
> Red
> Blue
> Green
>
> The answer I don't want :
>
> Colour
> --------
> Red
> Blue
> Green
> Red
> Red
> Blue
>
> How would I achieve the first result with mysql ? Is it possible?
>
>
> Thanks in advance,
>
> Richard
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/mysql?unsub=1
>
>