Re: SQL-question: returning the id of an insert querry - Mailing list pgsql-general

From Andreas Fromm
Subject Re: SQL-question: returning the id of an insert querry
Date
Msg-id 3FAE4330.2000007@physik.uni-erlangen.de
Whole thread Raw
In response to Re: SQL-question: returning the id of an insert querry  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-general
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



Martijn van Oosterhout wrote:
> After you've done the insert on the address table, you can use
> currval('address_id_seq') (or equivalent) to get the ID. Ofcourse you have
> to have used nextval() for the original insert.
>
> Hope this helps,
>
..going to try it. Thanks

Andreas Fromm

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE/rkMwPkvkZVZzNY0RAnajAJ0ePCTi/UODhGAxOs5NuptZAT0tUgCgpNAz
Oqh8rM934O3SRRzv4Mh9S4I=
=E71z
-----END PGP SIGNATURE-----


pgsql-general by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: SQL-question: returning the id of an insert querry
Next
From: Alex
Date:
Subject: Question on Select