Re: GetLastInsertID ?

Поиск
Список
Период
Сортировка
От Dennis Bjorklund
Тема Re: GetLastInsertID ?
Дата
Msg-id Pine.LNX.4.44.0401011711210.13889-100000@zigo.dhs.org
обсуждение исходный текст
Ответ на GetLastInsertID ?  (Stephane Pinel <spinel@noos.fr>)
Ответы Re: GetLastInsertID ?
Список pgsql-general
On Thu, 1 Jan 2004, Stephane Pinel wrote:

> the last inserted id in the table like we do with MySQL using the
> GetLastInsertID ?
>
> My need is to get back the new id just after inserting.

Use currval() after you have inserted.

http://www.postgresql.org/docs/current/static/functions-sequence.html

--
/Dennis


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