Unix Technical Forum

get the inserted row id

This is a discussion on get the inserted row id within the pgsql Novice forums, part of the PostgreSQL category; --> Hello all, How can i get the last inserted row id (like in mysql : LAST INSERT ID) ---------------------------(end ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Novice

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-17-2008, 09:36 PM
Zouari Fourat
 
Posts: n/a
Default get the inserted row id

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

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-17-2008, 09:36 PM
Michael Glaesemann
 
Posts: n/a
Default Re: get the inserted row id


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/i...-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




---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-17-2008, 09:36 PM
A. Kretschmer
 
Posts: n/a
Default Re: get the inserted row id

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/i...-sequence.html


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

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:32 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com