Re: @@IDENTITY - Mailing list pgsql-odbc

From Peter Eisentraut
Subject Re: @@IDENTITY
Date
Msg-id 200411101917.59460.peter_e@gmx.net
Whole thread Raw
In response to @@IDENTITY  (Mike Fahey <mfahey@enter.net>)
List pgsql-odbc
Mike Fahey wrote:
> Does select @@IDENTITY  work with version 8.0.02 ?
>
> IT returns "2" every single time.

@ is the absolute value operator.  You probably have a column "identity"
that contains 2 or -2.

> All I want to do is get the last inserted id from a sequence.

Use the currval() function.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/


pgsql-odbc by date:

Previous
From: Mike Fahey
Date:
Subject: @@IDENTITY
Next
From: Gary Doades
Date:
Subject: Re: ODBC Driver stability