returning id

Поиск
Список
Период
Сортировка
От Marc Fromm
Тема returning id
Дата
Msg-id 93361C67E4EE844A80935863A4FF4B6C05114F81@Exch2010MB-2.univ.dir.wwu.edu
обсуждение исходный текст
Ответы Re: returning id  (Lonni J Friedman <netllama@gmail.com>)
Re: returning id  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-admin

Can I use “RETURNING id” in an insert statement with postgresql version 8.1.10?

I cannot find a clear example on how to use it to capture the id created by the insert statement into a variable in PHP.

 

Many examples are like this but don’t state how to access the returned id:

INSERT INTO Addresses (address, city, state, postalcode) VALUES ('123 Main St.','Springfield','MA','01109') RETURNING id;

 

Thanks

 

Marc

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

Предыдущее
От: "Kevin Grittner"
Дата:
Сообщение: Re: Warm standby terminate itself?
Следующее
От: Lonni J Friedman
Дата:
Сообщение: Re: returning id