Re: Newbie: question on limiting number of records

Поиск
Список
Период
Сортировка
Искать

Re: Newbie: question on limiting number of records

От:
Colin Fox <cfox@crystalcherry.com>
Дата:
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
FAQ