Re: MySQL "DISTINCT" query
| From: | Mark Maggelet | Date: | Wed, 21 Mar 2001 20:01:46 +0000 |
| Subject: | Re: MySQL "DISTINCT" query | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-44991@lists.php.net to get a copy of this message | ||
On Wed, 21 Mar 2001 11:04:48 -0700, Jared Howard (webbie@deanox.com)
wrote:
>I need to retrive all column information from a DISTINCT query. But
>so
>far, I only can get one column to show by using this:
>
>SELECT DISTINCT my_column FROM my_table;
>
>which then gives me a list of my_column information and is correct,
>but I
>need all information from all columns. Querying this:
>
>SELECT DISTINCT my_column, my_column2, my_column3, my_column4 FROM
>my_table;
>
>was my guess at it, but doesn't work how I'd like.
SELECT * FROM my_table group by my_column;
- Mark