X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 1D73B3A42B8 for ; Wed, 10 Nov 2004 18:18:08 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 50710-10 for ; Wed, 10 Nov 2004 18:18:03 +0000 (GMT) Received: from mail.gmx.net (mail.gmx.de [213.165.64.20]) by svr1.postgresql.org (Postfix) with SMTP id 153663A42AB for ; Wed, 10 Nov 2004 18:18:02 +0000 (GMT) Received: (qmail 9823 invoked by uid 65534); 10 Nov 2004 18:18:00 -0000 Received: from dsl-082-082-234-251.arcor-ip.net (EHLO colt.pezone.net) (82.82.234.251) by mail.gmx.net (mp013) with SMTP; 10 Nov 2004 19:18:00 +0100 X-Authenticated: #495269 From: Peter Eisentraut To: Mike Fahey , Postgres list Subject: Re: @@IDENTITY Date: Wed, 10 Nov 2004 19:17:59 +0100 User-Agent: KMail/1.5.1 References: <419256E8.2070403@enter.net> In-Reply-To: <419256E8.2070403@enter.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200411101917.59460.peter_e@gmx.net> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200411/26 X-Sequence-Number: 4640 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/