Getting The Last Entry

Поиск
Список
Период
Сортировка
От Rodrigo Quezada
Тема Getting The Last Entry
Дата
Msg-id AANLkTimnpGpEFJzKWhijPTqUK=6T5UaxYs-KXDpRhcH4@mail.gmail.com
обсуждение исходный текст
Ответы Re: Getting The Last Entry  (Thom Brown <thom@linux.com>)
Список pgsql-novice
Hello,

I need to get de last entry from a table. I try using: 

DECLARE variable CURSOR FOR SELECT id FROM table;
FETCH LAST FROM variable;

And works fine, but when i try to use this code in a procedure, appears the following message:

ERROR:  syntax error at or near "FETCH"
LINE XX:  FETCH LAST FROM raton;
          ^

********** Error ********** 

Is there another way to get that last ID?

----
Rodrigo

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

Предыдущее
От: Matthias Leopold
Дата:
Сообщение: Re: logging table changes
Следующее
От: Bastiaan Olij
Дата:
Сообщение: Any known problems installing PG 8.4.4 on Win 2008 R2?