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() on the sequence name.
In response to
pgsql-sql by date
|Next:||From: Emi Lu||Date: 2008-04-14 13:41:41|
|Subject: export CSV file through Java JDBC|
|Previous:||From: A. Kretschmer||Date: 2008-04-11 17:48:06|
|Subject: Re: Get the last inserted id|