Get the last inserted id

From: "Nacef LABIDI" <nacef(dot)l(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Get the last inserted id
Date: 2008-04-11 17:23:04
Message-ID: f16f7ea00804111023xc2072ddk796b1e0336c14aac@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Scott Marlowe 2008-04-11 17:41:41 Re: Get the last inserted id
Previous Message Erik Jones 2008-04-11 14:35:28 Re: Testing for null record in plpgsql