Re: How to just get the last in a recursive query

Поиск
Список
Период
Сортировка
От Rob Sargent
Тема Re: How to just get the last in a recursive query
Дата
Msg-id 3817c56b-458d-5295-e8bc-1001231dc5c8@gmail.com
обсуждение исходный текст
Ответ на How to just get the last in a recursive query  (Shaozhong SHI <shishaozhong@gmail.com>)
Ответы Re: How to just get the last in a recursive query  (Shaozhong SHI <shishaozhong@gmail.com>)
Список pgsql-sql
On 4/4/22 16:14, Shaozhong SHI wrote:


---------- Forwarded message ---------
From: Shaozhong SHI <shishaozhong@gmail.com>
Date: Mon, 4 Apr 2022 at 23:13
Subject: How to just get the last in a recursive query
To: PostGIS Users Discussion <postgis-users@lists.osgeo.org>



3 rows got returns as follows:

 id
---  6  3  1

How to just get the last (namely, 1) in the most efficient way?
Regards, David
reverse the order of the last query and set limit 1

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

Предыдущее
От: Shaozhong SHI
Дата:
Сообщение: How to just get the last in a recursive query
Следующее
От: Shaozhong SHI
Дата:
Сообщение: Re: How to just get the last in a recursive query