Insert and obtain the pk

Поиск
Список
Период
Сортировка
От Eliu Montoya
Тема Insert and obtain the pk
Дата
Msg-id 200311061816.hA6IGqS22254@cc107.itam.mx
обсуждение исходный текст
Ответы Re: Insert and obtain the pk  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Re: Insert and obtain the pk  (Peter Eisentraut <peter_e@gmx.net>)
Re: Insert and obtain the pk  (Adam Ruth <aruth@intercation.com>)
Список pgsql-general

 

 

 

Hello everybody,

Does anyone know an easy way to  insert a record (without a value for the primary key because it is a sequence)  and at the same time obtain the value of primary key that was assign to this new record.

 

I always try insert and then select with the same values that I used for the insert, but I believe this is not a good way to do it.

 

Any suggestions???

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

Предыдущее
От: "Simon Stiefel"
Дата:
Сообщение: Re: Question on database structure
Следующее
От: Oleg Bartunov
Дата:
Сообщение: Re: tsearch2 and gist index bloat