Thread: get the inserted row id

get the inserted row id

From
"Zouari Fourat"
Date:
Hello all,
How can i get the last inserted row id (like in mysql : LAST INSERT ID)

Re: get the inserted row id

From
Michael Glaesemann
Date:
On Feb 20, 2006, at 18:42 , Zouari Fourat wrote:

> Hello all,
> How can i get the last inserted row id (like in mysql : LAST INSERT
> ID)

http://www.postgresql.org/docs/8.1/interactive/functions-sequence.html
http://www.postgresql.org/docs/faqs.FAQ.html#item4.11.2

You may find the other FAQ items and the documentation of the
documentation useful as well.

Michael Glaesemann
grzm myrealbox com




Re: get the inserted row id

From
"A. Kretschmer"
Date:
am  20.02.2006, um 10:42:06 +0100 mailte Zouari Fourat folgendes:
> Hello all,
> How can i get the last inserted row id (like in mysql : LAST INSERT ID)

With currval().

Read our docu:
http://www.postgresql.org/docs/8.1/interactive/functions-sequence.html


Andreas
--
Andreas Kretschmer    (Kontakt: siehe Header)
Heynitz:  035242/47215,      D1: 0160/7141639
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
 ===    Schollglas Unternehmensgruppe    ===