Re: Creating A Unique List With Table Query

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



revDAVE wrote:

> Newbie question
> 
> Hi Folks,
> 
> I would like to be able to query a table, and return only the unique
> values from a particular field. For example: to get all contents from
> the category field from the contacts table:
> 
> Query = ....
> 
> SELECT Category FROM contacts
> 
> But this will produce many duplicates.
> 
> Question : How do I filter the query to only produce unique values?

SELECT DISTINCT Category FROM contacts



-- 
Per Jessen, Zürich (1.6°C)


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux