Re: [SQL] PLSQL Question regarding multiple inserts

2004-02-29 Thread V i s h a l Kashyap @ [Sai Hertz And Control Systems]
Dear Humble Geek , -- id is primary key insert into users (id, username) values (nextval('someSeq'),'somename'); -- id is also a PK insert into log (id, uid, message) values (nextval('someOtherSeq'),XXX,'New Account'); Assume XXX is the id from the first insert. How do I get that number? Not currv

[SQL] PLSQL Question regarding multiple inserts

2004-02-29 Thread Humble Geek
Hi all. Quick and perhaps silly question, but... I am using Pg 7.3. I am writing a function using pgplsql. This function will perform multiple inserts. Let's say two of the inserts are as follows: -- id is primary key insert into users (id, username) values (nextval('someSeq'),'somename'); -- id