Re: [GENERAL] Getting ID of last-inserted row

2009-05-20 Thread Scott Marlowe
On Wed, May 20, 2009 at 4:35 AM, David wrote: >>> I never found an adequate (simple and efficient) method for getting >>> the primary key ID of the just-inserted row, and usually used >>> transactions and "select last value, ordered by id"-type queries to >>> get the last id value, or other ugly l

Fwd: [GENERAL] Getting ID of last-inserted row

2009-05-20 Thread David
>> I never found an adequate (simple and efficient) method for getting >> the primary key ID of the just-inserted row, and usually used >> transactions and "select last value, ordered by id"-type queries to >> get the last id value, or other ugly logic. > > use currval() instead, see > http://www.p

Re: [GENERAL] Getting ID of last-inserted row

2009-05-20 Thread Raymond O'Donnell
On 20/05/2009 11:17, A. Kretschmer wrote: > In response to David : >> Hi there. >> >> I never found an adequate (simple and efficient) method for getting >> the primary key ID of the just-inserted row, and usually used >> transactions and "select last value, ordered by id"-type queries to >> get th

Re: [GENERAL] Getting ID of last-inserted row

2009-05-20 Thread A. Kretschmer
In response to David : > Hi there. > > I never found an adequate (simple and efficient) method for getting > the primary key ID of the just-inserted row, and usually used > transactions and "select last value, ordered by id"-type queries to > get the last id value, or other ugly logic. use currva

[GENERAL] Getting ID of last-inserted row

2009-05-20 Thread David
Hi there. I never found an adequate (simple and efficient) method for getting the primary key ID of the just-inserted row, and usually used transactions and "select last value, ordered by id"-type queries to get the last id value, or other ugly logic. That was until I found how SQLalchemy[1] hand