INSERT ... RETURNING as Oracle

Поиск
Список
Период
Сортировка
От Sipos Andras
Тема INSERT ... RETURNING as Oracle
Дата
Msg-id 005101c0a413$83815900$0401a8c0@mzperx.hu
обсуждение исходный текст
Ответы Re: INSERT ... RETURNING as Oracle
Re: INSERT ... RETURNING as Oracle
Список pgsql-general
Hi,

Sample table:

create table basket (
  id   serial  NOT NULL PRIMARY KEY,
  timestamp  timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
);

Can I how to make in one step insert into the table and get values of 'ID' ?
I find similar solution then oracle's INSERT ... RETURNING.

If first make INSERT, and after SELECT MAX(ID), then result is uncertain.

my system version: 7.0.2

Thx,
Andras


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

Предыдущее
От: Li Min Liu
Дата:
Сообщение: chinese_big5 patches for PgAccess
Следующее
От: Josh Rovero
Дата:
Сообщение: Re: PostgreSQL 7 on Solaris 8 - Is it working?