Skip site navigation (1) Skip section navigation (2)

Getting the last inserted id

From: Mike Fahey <mfahey(at)enter(dot)net>
To: Postgres list <pgsql-odbc(at)postgresql(dot)org>
Subject: Getting the last inserted id
Date: 2004-11-12 17:36:23
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-odbc
So I guess the question still remains, how do you get the last inserted 
id from a sequence?

I'm using access 2003 & postgres odbc 8.0.02

select @@IDENTITY seems to be MS Specific and not work with postgres.

calling currval has to be a pass-through query which makes it high 
complicated if at all

How does everyone else do this ?

How does any database maintain referential integrity if this doesn't work?

pgsql-odbc by date

Next:From: Fred ParkinsonDate: 2004-11-12 17:59:53
Subject: Re: Getting the last inserted id
Previous:From: Johann ZuschlagDate: 2004-11-12 17:23:19
Subject: Re: 08.00.0002 useless :-)

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group