Simple problem?

From: Stan Jacobs <jacobs(at)jtek(dot)com>
To: pgsql-general(at)postgreSQL(dot)org
Subject: Simple problem?
Date: 2000-03-02 07:12:36
Message-ID: Pine.LNX.4.10.10003012309200.7831-100000@dev.jtek.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Wim Aarts 2000-03-02 07:34:21 Re: [GENERAL] Re: "LockRelease: locktable lookup failed, no lock"
Previous Message Bruce Momjian 2000-03-02 02:01:56 Re: [GENERAL] psql 7.0.0 beta