Re: Newbie: question on limiting number of records

Поиск
Список
Период
Сортировка
От Colin Fox
Тема Re: Newbie: question on limiting number of records
Дата
Msg-id pan.2002.02.26.15.46.14.760165.8309@crystalcherry.com
обсуждение исходный текст
Список pgsql-general
On Fri, 08 Feb 2002 10:33:22 -0800, G.W. Lucas wrote:

<..>
>
> I would like to perform a query and obtain a result something like the
> following:
>
>    for all names
>    show latest three records (or fewer, if 3 not available)

Look into the 'limit' keyword:

select * from people order by id limit 10;

will return the first 10 entries in the people table.

--
Colin Fox
CF Consulting Inc.
cfox@crystalcherry.com

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

Предыдущее
От: "Adam"
Дата:
Сообщение: Re: setting up a trace through extended stored procedures
Следующее
От: a_asvin@mailcity.com (Asvin Ananthanarayan)
Дата:
Сообщение: PostgreSQl or BerkeleyDB ??