Re: offset for query result ??

Поиск
Список
Период
Сортировка
От Alex Satrapa
Тема Re: offset for query result ??
Дата
Msg-id 3FB960DA.6090604@lintelsys.com.au
обсуждение исходный текст
Ответ на offset for query result ??  (Kathy Zhu <Kathy.Zhu@Sun.COM>)
Список pgsql-general
Kathy Zhu wrote:
> I know we have LIMIT to limit the number of rows returned, I wonder if there is
> a way to indicate an offset.

> Select * from Test offset 10, limit 4;

As per the PostgreSQL documentation, specifically the page on the
"SELECT" SQL command:

LIMIT Clause


    LIMIT { count | ALL }
     OFFSET start


  where count specifies the maximum number of rows to return, and start
specifies the number of rows to skip before starting to return rows.



so the query you want is:

SELECT * FROM Test LIMIT 4 OFFSET 10;

Alex


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

Предыдущее
От:
Дата:
Сообщение: Re: PostgreSQL v7.4 Released
Следующее
От: Reece Hart
Дата:
Сообщение: Re: PostgreSQL v7.4 Released