SELECT LIMIT and the last rows of a query - Mailing list pgsql-general

From mathprof@bigfoot.com
Subject SELECT LIMIT and the last rows of a query
Date
Msg-id 200002192300.RAA14820@ogopogo.flash.net
Whole thread Raw
List 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 by date:

Previous
From: Tom
Date:
Subject: Backend terminated abnormally error ?
Next
From: Tom
Date:
Subject: Backend terminated abnormally error ?