Re: Use of the LIMIT clause ?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Use of the LIMIT clause ?
Дата
Msg-id 7612.984439579@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Use of the LIMIT clause ?  (Richard Bayet <bayet@enseirb.fr>)
Список pgsql-admin
Richard Bayet <bayet@enseirb.fr> writes:
> I did knew about this, but the author goes further about the "limit
> N,P", which allows someone to get only results between the Nth and Pth
> lines of the whole result...

Is that actually how MySQL interprets two parameters?  We treat them
as count and offset respectively, which definition I thought was the
same as MySQL's.

> I tried this with psql, but couldn't get anything but parse errors.

Works for me:

regression=# select unique1 from tenk1 limit 10;
 unique1
---------
    8800
    1891
    3420
    9850
    7164
    8009
    5057
    6701
    4321
    3043
(10 rows)

regression=# select unique1 from tenk1 limit 3,5;
 unique1
---------
    8009
    5057
    6701
(3 rows)

regression=#

What PG version are you running?

            regards, tom lane

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

Предыдущее
От: Grant
Дата:
Сообщение: Re: Authentication by password
Следующее
От: Dave Millen
Дата:
Сообщение: Re: Computer with Linux OS not shown on Computers with Windows OS