| От | Richard Huxton |
|---|---|
| Тема | Re: Last x records |
| Дата | |
| Msg-id | 003301c0a0b8$57984f00$1001a8c0@archonet.com обсуждение исходный текст |
| Ответ на | Last x records (Matthias Teege <matthias@mteege.de>) |
| Ответы |
Re: Last x records
|
| Список | pgsql-general |
From: "Matthias Teege" <matthias@mteege.de> > Moin, > > is there any way to get the last x records of an query > result? > > I can use "... order by x DESC LIMIT n" but I need ASC not > DESC, the last records in the correct order. If you know how many records there are you could use "LIMIT n OFFSET m" where m = number of records - n Otherwise, the only thing that I can think of is to set up a view that does the LIMIT n on a DESC then sort ASC when selecting on that view - might work. - Richard Huxton
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера