Subject | Re: Highest and Second highest values |
---|---|
Author | Adam |
Post date | 2006-03-24T03:11:19Z |
> Is it possible to select both the max and next max value in a tableusing
> dsql? Ie the 2 highest values in a tables column.Easy.
select first 2 *
from mytable
order by myvalue desc
A descending index on myvalue is useful if the table is large.
Adam