getting auto increment id value

From: M(dot) Emre Çolak <memrecolak(at)hotmail(dot)com>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: getting auto increment id value
Date: 2011-12-13 08:52:29
Message-ID: DUB110-DS244924AB9860CA93A20F14D7BD0@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi,
I have a table and it's only distinct value is it's auto incremented id.
I need to insert like 80.000 rows at ones so I have some time issues.
Problem is I need a way to get a return value which is id of my inserted row
since I need that id for another insert action. I think I should use a
function for this but I am not sure how I can get Id of my inserted row.
Thanks.
M. Emre Çolak

In response to

  • type list at 2011-12-12 21:29:06 from Jean-Yves F. Barbier

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Aleksej Trofimov 2011-12-13 09:16:50 Postgresql array parser
Previous Message Pandu Poluan 2011-12-13 03:40:28 Re: SELECT from two tables with different field names?