INSERT question - Mailing list pgsql-sql

From Brian@McSweeney.iol.ie (Brian)
Subject INSERT question
Date
Msg-id 1f5f2b44.0111130130.17e8e57a@posting.google.com
Whole thread Raw
Responses Re: INSERT question  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Re: INSERT question  (Roland Roberts <roland@astrofoto.org>)
List pgsql-sql
Hi everyone,
I've a little question about using insert statements. I've got a
parent table with a "serial" (automatically incrementing integer)
primary key. I have a child table with a foreign key which references
that primary key. My question is:

To insert values into the child table corresponding to an entry in the
parent table, how do I get a reference to the serial primary key (so
as I can reference it for the foreign key entry)

Hope you understand what I mean. This should be a regular occurance
and seeing as I'm not an sql guru, I just don't have a clue!

Any help would be SOOO appreciated.
Brian


pgsql-sql by date:

Previous
From: Orion
Date:
Subject: Funny Parse Error on Insert
Next
From: "Aasmund Midttun Godal"
Date:
Subject: Unable to use '-' in column names in PLPGSQL