Re: Quick MySql Question
| From: | Taylor York | Date: | Mon, 21 Oct 2002 22:43:56 +0000 |
| Subject: | Re: Quick MySql Question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-120814@lists.php.net to get a copy of this message | ||
SELECT make FROM
table GROUP BY make
Does the job. If you have multiple colums, IE Make, Year you can do..
SELECT * FROM table GROUP BY make, year
"Taylor York" <taylor@dreamstargroup.com> wrote in message
news:20021021222348.91182.qmail@pb1.pair.com...
> Hello, basically, I want a select with no duplicates...
> I have a table similar to:
> +----+--------+--------+
> | id | model | make |
> +----+--------+--------+
> | 1 | Supra | Toyota |
> +----+--------+--------+
> | 2 | Civic | Honda |
> +----+--------+--------+
> | 3 | Celica | Toyota |
> +----+--------+--------+
> | 4 | Accord | Honda |
> +----+--------+--------+
>
> If I do a " SELECT make FROM table " I will get 2
> toyotas, and 2 hondas,
> But what I want is just 1 toyota, and 1 honda.
>
> Any suggestions?
>
>
>
>
>