last id

Поиск
Список
Период
Сортировка
От Ramil G. Sagum
Тема last id
Дата
Msg-id 1056685295.7712.19.camel@arwen.hq.astra.ph
обсуждение исходный текст
Ответ на Re: Best Practice??  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: last id
Список pgsql-novice
is there a way to

1. insert a row to table A
2. get the value of the serial field from the now in no.1
3. insert a row to table B (one of the fields uses the value from no.2)

in -one transaction-?

i'm currently doing it using functions, but is there another way?
(kind of like the mysql_insert_id function in mysql)




ramil



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

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: Address Table
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: last id