Re: last entry

Поиск
Список
Период
Сортировка
От Ian Harding
Тема Re: last entry
Дата
Msg-id sd5cbb07.092@mail.tpchd.org
обсуждение исходный текст
Ответ на last entry  (mixo <mixo@beth.uniforum.org.za>)
Список pgsql-general
If you mean the value of the primary key (if a sequence is used) the way to do that is (in the same connection) to
issuea "select currval('sequencename')" which will return the last used value of that sequence within the current
connection.

If you mean the OID, there is a way to do that too, but I don't use them for ID so I don't know.

Ian A. Harding
Programmer/Analyst II
Tacoma-Pierce County Health Department
(253) 798-3549
mailto: iharding@tpchd.org

We have only two things to worry about:  That things will never get
back to normal, and that they already have.


>>> mixo <mixo@beth.uniforum.org.za> 08/16/02 01:33AM >>>

Is it possible to identify the last entry that has been just insterted
into a table?



---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster


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

Предыдущее
От: Oliver Elphick
Дата:
Сообщение: Re: Triggers
Следующее
От:
Дата:
Сообщение: Re: Seq scan