pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliveiros Cristina <oliveiros.cristina@marktest.pt>
To: pgsql-sql@postgresql.org
Subject: Obtaining the primary key of the record just inserted
Date: Thu, 8 Nov 2007 17:56:14 -0000
Message-ID: <009901c82230$a799d3b0$ec5a3d0a@marktestcr.marktest.pt> (raw)

 
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

view thread (3+ messages)  latest in thread

Message-ID: <009901c82230$a799d3b0$ec5a3d0a@marktestcr.marktest.pt>
Permalink:  ../009901c82230$a799d3b0$ec5a3d0a@marktestcr.marktest.pt/
Also on:    postgresql.org/message-id/009901c82230$a799d3b0$ec5a3d0a@marktestcr.marktest.pt

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: oliveiros.cristina@marktest.pt
  Subject: Re: Obtaining the primary key of the record just inserted
  In-Reply-To: <009901c82230$a799d3b0$ec5a3d0a@marktestcr.marktest.pt>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox