GetLastInsertID ?

From: Stephane Pinel <spinel(at)noos(dot)fr>
To: pgsql-general(at)postgresql(dot)org
Subject: GetLastInsertID ?
Date: 2004-01-01 15:10:56
Message-ID: B30877F4-3C6C-11D8-B609-00039396B574@noos.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Happy new year to all pgsql fans !

Sorry for this trivial question but I couldn't find an answer in the
archives :

I use SERIAL type in tables for id columns in order to auto increment
them. Is there a way to get
the last inserted id in the table like we do with MySQL using the
GetLastInsertID ?

My need is to get back the new id just after inserting. Is nextval can
respond to this need if I call it
just before inserting ?

Thank you very much.

Stéphane

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Glaesemann 2004-01-01 15:48:22 Re: Bug and/or feature? Complex data types in tables...
Previous Message Lee Harr 2004-01-01 13:24:35 Re: finding my schema (for sequences)