Re: top?

Поиск
Список
Период
Сортировка
От Christopher Kings-Lynne
Тема Re: top?
Дата
Msg-id GNELIHDDFBOCMGBFGEFOOEAACBAA.chriskl@familyhealth.com.au
обсуждение исходный текст
Ответ на Re: top?  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Список pgsql-sql
> On Thu, 3 Jan 2002, Richard Rowell wrote:
>
> > Just wondering if there was a "TOP" equivilant in Postgres?
> > IE
> > select top 1 * from froo
> > (only returns 1 row)
>
> select * from froo limit 1;
>
> Usually you'll want to order as well so that you get a meaningfully
> chosen row rather than whatever row happens to be scanned first.

Actually I think its essential that he orders it.  I think the 'top' thing
is a microsoft-ism that gets the 'top 10 items' say from a column.  I can't
remember if it's the 10 with the highest values or the ten with the most
common values...

Chris



В списке pgsql-sql по дате отправления:

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: top?
Следующее
От: Bhuvan A
Дата:
Сообщение: maintaining a field for every UPDATION.