Re: GetLastInsertID ? - Mailing list pgsql-general

From Mike Nolan
Subject Re: GetLastInsertID ?
Date
Msg-id 200401012137.i01Lblr6003362@gw.tssi.com
Whole thread Raw
In response to Re: GetLastInsertID ?  (Dennis Bjorklund <db@zigo.dhs.org>)
Responses Re: GetLastInsertID ?
Re: GetLastInsertID ?
Re: GetLastInsertID ?
List pgsql-general
> > 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.
>
> Use currval() after you have inserted.

That will not necessarily tell you the last insertion, depending
upon how many other users there are doing inserts.

For that matter, I'm not sure that the MySQL method works with multiple
users either.
--
Mike Nolan

pgsql-general by date:

Previous
From: Mark Kirkwood
Date:
Subject: Re: Mnogosearch (Was: Re: website doc search is ... )
Next
From: Baldur Norddahl
Date:
Subject: why the need for is null?