Re: Obtaining the primary key of the record just inserted

From: Sean Davis <sdavis2(at)mail(dot)nih(dot)gov>
To: Oliveiros Cristina <oliveiros(dot)cristina(at)marktest(dot)pt>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Obtaining the primary key of the record just inserted
Date: 2007-11-08 18:01:48
Message-ID: 47334F0C.4090508@mail.nih.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Oliveiros Cristina wrote:
> 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
Is the primary key a SERIAL column?

Sean

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Hans-Peter Oeri 2007-11-08 19:24:49 Re: Obtaining the primary key of the record just inserted
Previous Message Oliveiros Cristina 2007-11-08 17:50:16 Obtaining the primary key of the record just inserted