This can also help:

select id,value from table order by value desc limit 1;


Cheers

Claudio


2009/9/10 Slackli User <slackliu...@gmail.com>

> Thanks all the info.
> Just got what I wanted.
>
> 2009/9/10 Wolfgang Schaefer <scha...@gmail.com>:
> > John Daisley schrieb:
> >> SELECT MAX(value), id FROM table
> >> GROUP BY id;
> >>
> >>
> >>
> >
> > I guess what Slackli had in mind was more something like this:
> > SELECT id, value
> > FROM table
> > WHERE value = (SELECT max(value) FROM table);
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/mysql?unsub=claudio.na...@gmail.com
>
>


-- 
Claudio

Reply via email to