getting back autonumber just inserted

From: mail TechEvolution <mail(at)techevolution(dot)be>
To: pgsql-sql(at)postgresql(dot)org
Subject: getting back autonumber just inserted
Date: 2005-07-07 17:50:16
Message-ID: 42CD6B58.6060508@techevolution.be
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Alvaro Herrera 2005-07-07 18:03:29 Re: getting back autonumber just inserted
Previous Message Tony Wasson 2005-07-07 01:11:32 Re: left joins