X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id EA93152915 for ; Thu, 7 Jul 2005 14:50:19 -0300 (ADT) 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 70820-10 for ; Thu, 7 Jul 2005 17:50:18 +0000 (GMT) Received: from adicia.telenet-ops.be (adicia.telenet-ops.be [195.130.132.56]) by svr1.postgresql.org (Postfix) with ESMTP id 4026B528C7 for ; Thu, 7 Jul 2005 14:50:17 -0300 (ADT) Received: from localhost (localhost.localdomain [127.0.0.1]) by adicia.telenet-ops.be (Postfix) with SMTP id 552D944083 for ; Thu, 7 Jul 2005 19:50:15 +0200 (MEST) Received: from [192.168.0.236] (dD5E04CB3.access.telenet.be [213.224.76.179]) by adicia.telenet-ops.be (Postfix) with ESMTP id E23324418E for ; Thu, 7 Jul 2005 19:50:14 +0200 (MEST) Message-ID: <42CD6B58.6060508@techevolution.be> Date: Thu, 07 Jul 2005 19:50:16 +0200 From: mail TechEvolution User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: nl-NL, nl, en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: getting back autonumber just inserted Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200507/39 X-Sequence-Number: 22017 hello i ame a newbie to PostGreSQL, I ame using PostGreSQL 8.0 (windowsinstaller) on a xp prof platform i would like to get back the autonumber from the last record inserted, for other SQL db (m$ sql db ...) i could use: SELECT @@ IDENTITY can someone help me by informing me what the SQL syntax is to be used with PostGreSQL db and get the same result, the last autonumber inserted? greeTz wes