Retrieve primary key after inserting

Поиск
Список
Период
Сортировка
От Alex Dovlecel
Тема Retrieve primary key after inserting
Дата
Msg-id E18E8Y1-00046R-00@ford.kbs.twi.tudelft.nl
обсуждение исходный текст
Ответы Re: Retrieve primary key after inserting
Список pgsql-jdbc
Hello all,

Is there a special mechanism to retrieve the primary key from a record that I
just inserted?

For example, I have a table with the PK of SERIAL type. So when inserting I
let the psql to choose the primary key. But how can I get the primary key
that was set for the record? BEcause i have a relation based on that primary
key... !!! (I think it is a classic problem...)

Does psql have some special feature to help me overcome this problem ?

Tx
dovle

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

Предыдущее
От: Warren Little
Дата:
Сообщение: calling isClosed appears to hang
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: documentation