Re: get a pkey/id back from/after an insert

Поиск
Список
Период
Сортировка
От Corey
Тема Re: get a pkey/id back from/after an insert
Дата
Msg-id 200606191418.01103.corey@bitworthy.net
обсуждение исходный текст
Ответ на get a pkey/id back from/after an insert  ("Corey" <corey@bitworthy.net>)
Ответы Re: get a pkey/id back from/after an insert  (Richard Broersma Jr <rabroersma@yahoo.com>)
Список pgsql-novice
On Monday 19 June 2006 13:40, Corey wrote:
<snip>
> I'm using the perl dbi interface to postgres, and I'm wondering how
> people do the following:
>
> insert a row into a table, and then immediately get back the pkey/id
> of the row, so that I can then use this id to insert into another related
> table.
>

Ok, so of course, a few more minutes of searching/reading/googling,
and I found the answer to my own question:

currval()/nextval()


Sorry for the noise!

Cheers,

Corey


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

Предыдущее
От: "Corey"
Дата:
Сообщение: get a pkey/id back from/after an insert
Следующее
От: Richard Broersma Jr
Дата:
Сообщение: Re: get a pkey/id back from/after an insert