Obtaining the primary key of the record just inserted

From: "Oliveiros Cristina" <oliveiros(dot)cristina(at)marktest(dot)pt>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: Obtaining the primary key of the record just inserted
Date: 2007-11-08 17:56:14
Message-ID: 009901c82230$a799d3b0$ec5a3d0a@marktestcr.marktest.pt
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


Hello, All,

I have the need to know the primary key assigned to a record I've just INSERTed .

Is there an easy way to solve this ?

Similar to SQLServer's SELECT scope_identity() ; ?

Any help deeply appreciated

Best,
Oliveiros

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Scott Marlowe 2007-11-08 18:03:00 Re: Obtaining the primary key of the record just inserted
Previous Message Vivek Khera 2007-11-08 16:45:45 Re: Partitioning and Foreign Keys