Return the primary key of a newly inserted row?

Поиск
Список
Период
Сортировка
От John Tregea
Тема Return the primary key of a newly inserted row?
Дата
Msg-id 449A10E0.6060200@debraneys.com
обсуждение исходный текст
Ответ на Re: SQL query question  ("Gurjeet Singh" <singh.gurjeet@gmail.com>)
Ответы Re: Return the primary key of a newly inserted row?  (John Tregea <john@debraneys.com>)
Re: Return the primary key of a newly inserted row?  (Tim Allen <tim@proximity.com.au>)
Re: Return the primary key of a newly inserted row?  (Kenneth Downs <ken@secdat.com>)
Список pgsql-general
Greeting again,

I am writing records to postgreSQL from an IDE called revolution. At the
time I perform the INSERT command I need to retrieve the value of the
serial_id column from the newly created row.

Is it possible to have a specified column value returned after the
INSERT (rather than the number of rows affected) ?

That would save me doing a SELECT select statement after every INSERT.

Please excuse the terminology if it is not SQL'esque, but I hope you
know what I am getting at.

Thanks in advance

John Tregea

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

Предыдущее
От: Qingqing Zhou
Дата:
Сообщение: Re: Out of memory error in 8.1.0 Win32
Следующее
От: John Tregea
Дата:
Сообщение: Re: Return the primary key of a newly inserted row?