Simple problem?

Поиск
Список
Период
Сортировка
От Stan Jacobs
Тема Simple problem?
Дата
Msg-id Pine.LNX.4.10.10003012309200.7831-100000@dev.jtek.com
обсуждение исходный текст
Ответы Re: [GENERAL] Simple problem?  (Peter Eisentraut <e99re41@DoCS.UU.SE>)
Список pgsql-general
Hi there,

I must be confusing my syntax somehow, because I'm having trouble doing a
simple update with returned id...  As in.... I have two tables: an order
table and an orderitems table.  I need to write the order record, then use
the order_id from the order record in the insert to the orderitems record.

1. Can I use a transaction begin/end for the entire transaction if I need
to get the order_id in between the two writes?

2. How do I get the order_id from the record I just wrote?


    thanks in advance.

        -sj




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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [GENERAL] psql 7.0.0 beta
Следующее
От: Wim Aarts
Дата:
Сообщение: Re: [GENERAL] Re: "LockRelease: locktable lookup failed, no lock"