Re: [SQL] fetching the id of a new row

2001-02-11 Thread Richard Huxton
Albert REINER wrote: > > I do not know of a way to insert and select in one statement without > the use of a function (what's the problem with those, by the way?), > but as far as I can tell nextval() will return the next value for any > backend, so if you have more than one backend inserting at

Re: [SQL] fetching the id of a new row

2001-02-10 Thread Albert REINER
On Thu, Feb 08, 2001 at 05:28:59PM -0500, Jelle Ouwerkerk wrote: > Hi, > > How might I insert a new row into a table and return the id of the new row > all in the same SQL statement? The id is generated by a sequence. Up to > now I've been getting the nextval of the sequence first and then insert

[SQL] fetching the id of a new row

2001-02-08 Thread Jelle Ouwerkerk
Hi, How might I insert a new row into a table and return the id of the new row all in the same SQL statement? The id is generated by a sequence. Up to now I've been getting the nextval of the sequence first and then inserting with the id in a second SQL exec. Is there a faster way (in a general c