Re: [SQL] Get the last inserted id

2008-04-11 Thread Andrew Sullivan
On Fri, Apr 11, 2008 at 07:23:04PM +0200, Nacef LABIDI wrote: > Hi all, > > I was wondering if postgres can return the last ID inserted for a table > which the primary key is autoincremented. I need to retrieve this ID in my > code to continue processing on that inserted row. Use select currval()

Re: [SQL] Get the last inserted id

2008-04-11 Thread A. Kretschmer
am Fri, dem 11.04.2008, um 19:23:04 +0200 mailte Nacef LABIDI folgendes: > Hi all, > > I was wondering if postgres can return the last ID inserted for a table which > the primary key is autoincremented. I need to retrieve this ID in my code to > continue processing on that inserted row. Either

Re: [SQL] Get the last inserted id

2008-04-11 Thread Nacef LABIDI
Nice idea but how can I use this in a frontend that I am developing using Delphi and ADO objects ? On Fri, Apr 11, 2008 at 7:41 PM, Scott Marlowe <[EMAIL PROTECTED]> wrote: > On Fri, Apr 11, 2008 at 11:23 AM, Nacef LABIDI <[EMAIL PROTECTED]> wrote: > > Hi all, > > > > I was wondering if postgres

Re: [SQL] Get the last inserted id

2008-04-11 Thread Scott Marlowe
On Fri, Apr 11, 2008 at 11:23 AM, Nacef LABIDI <[EMAIL PROTECTED]> wrote: > Hi all, > > I was wondering if postgres can return the last ID inserted for a table > which the primary key is autoincremented. I need to retrieve this ID in my > code to continue processing on that inserted row. smarlowe=

[SQL] Get the last inserted id

2008-04-11 Thread Nacef LABIDI
Hi all, I was wondering if postgres can return the last ID inserted for a table which the primary key is autoincremented. I need to retrieve this ID in my code to continue processing on that inserted row. Thanks to all