Re: SQL-question: returning the id of an insert querry

Поиск
Список
Период
Сортировка
От Andreas Fromm
Тема Re: SQL-question: returning the id of an insert querry
Дата
Msg-id 3FAE4330.2000007@physik.uni-erlangen.de
обсуждение исходный текст
Ответ на Re: SQL-question: returning the id of an insert querry  (Martijn van Oosterhout <kleptog@svana.org>)
Список 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 по дате отправления:

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: SQL-question: returning the id of an insert querry
Следующее
От: Alex
Дата:
Сообщение: Question on Select