Re: offset for query result ??

Поиск
Список
Период
Сортировка
От Troels Arvin
Тема Re: offset for query result ??
Дата
Msg-id pan.2003.11.17.23.25.36.351685@arvin.dk
обсуждение исходный текст
Ответ на pg_constraint missing many entries?  (Jeff Boes <jboes@nexcerpt.com>)
Список pgsql-general
On Mon, 17 Nov 2003 16:17:20 -0700, 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.
>
> e.g.
>
> Select * from Test offset 10, limit 4;

Make that

SELECT *
FROM Test
LIMIT 4 OFFSET 10;

> retrieve all Test, return 4 rows from the 10th row

Almost. In PostgreSQL, OFFSET x means skip the first x rows. See also
http://www.postgresql.org/docs/7.4/static/sql-select.html#SQL-LIMIT

--
Greetings from Troels Arvin, Copenhagen, Denmark


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

Предыдущее
От: Doug McNaught
Дата:
Сообщение: Re: Better Unilization of Memory
Следующее
От: Shridhar Daithankar
Дата:
Сообщение: Re: Move a table to another schema