SELECT LIMIT and the last rows of a query

Поиск
Список
Период
Сортировка
От mathprof@bigfoot.com
Тема SELECT LIMIT and the last rows of a query
Дата
Msg-id 200002192300.RAA14820@ogopogo.flash.net
обсуждение исходный текст
Список pgsql-general
The command:

SELECT (query) LIMIT m,n

gives m rows of the query's response, starting at row n+1, while

SELECT (query) LIMIT m

gives the first m rows of the query's response (starting at row 1).

Is there any easy way to get the *last* m rows of a query? I tried:

SELECT (query) LIMIT 5, -5

in an attempt to get the last 5 rows, but this gives a parser error. Any
other thoughts?


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

Предыдущее
От: Tom
Дата:
Сообщение: Backend terminated abnormally error ?
Следующее
От: Tom
Дата:
Сообщение: Backend terminated abnormally error ?