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: 4194F497.9040104@enter.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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
possible.

How does everyone else do this ?

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

Browse pgsql-odbc by date

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