Obtaining the primary key of the record just inserted

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

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-novice by date

  From Date Subject
Next Message Sean Davis 2007-11-08 18:01:48 Re: Obtaining the primary key of the record just inserted
Previous Message Nico Callewaert 2007-11-08 15:35:38 Re: Trigger function syntax