LAST_INSERT_ID equivalent

Поиск
Список
Период
Сортировка
От Erik Price
Тема LAST_INSERT_ID equivalent
Дата
Msg-id 3EE8B513.2070804@ptc.com
обсуждение исходный текст
Ответы Re: LAST_INSERT_ID equivalent  (Edmund Dengler <edmundd@eSentire.com>)
Re: LAST_INSERT_ID equivalent  (Darko Prenosil <darko.prenosil@finteh.hr>)
Re: LAST_INSERT_ID equivalent  (Richard Huxton <dev@archonet.com>)
Re: LAST_INSERT_ID equivalent  (Arjen van der Meijden <acm@tweakers.net>)
Список pgsql-general
I have a table with a SEQUENCE on it that increments the primary key (a
BIGINT column) of the table whenever a new insert is performed.

Is there a way to determine the last incremented value, so that if I do
an insert, I can record the primary key of the record somewhere?  I'm
interested in any technique for doing this, but especially a
JDBC-specific solution.

Sorry if the answer should be obvious but I am coming from MySQL and
trying to learn the ANSI equivalent of the MySQL features.



Thanks,


Erik


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

Предыдущее
От: Steve Crawford
Дата:
Сообщение: pg_conf idea (was Re: Postgres performance comments from a MySQL user)
Следующее
От: Steve Crawford
Дата:
Сообщение: Re: need a method to ping a running database