List:General Discussion« Previous MessageNext Message »
From:Richard Date:February 14 2008 3:34pm
Subject:select unique ?
View as plain text  
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
Thread
select unique ?Richard14 Feb
  • Re: select unique ?peter lovatt14 Feb
  • Re: select unique ?Ben Clewett14 Feb
    • RE: select unique ?Randall Price15 Feb
      • Re: select unique ? (solved thankyou :))Richard16 Feb
      • Re: select unique ?Baron Schwartz16 Feb