Re: Unique SQL query?????????????
| From: | Jason Wong | Date: | Sat, 08 Jun 2002 05:44:59 +0000 |
| Subject: | Re: Unique SQL query????????????? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-19680@lists.php.net to get a copy of this message | ||
On Saturday 08 June 2002 08:42, Georgie Casey wrote:
> Is there any SQL command that will return a list of *unique* entries from a
> fied. ie only repeat one for duplicates
>
> i have a database of products, each having a category, and obviously a lot
> of products have the same category and I want to create an index of all the
> different categories.
SELECT DISTINCT category FROM products
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
Ocean: A body of water occupying about two-thirds of a world made for man --
who has no gills.
-- Ambrose Bierce
*/