Re: mysql's last_insert_id

Поиск
Список
Период
Сортировка
От Dennis Björklund
Тема Re: mysql's last_insert_id
Дата
Msg-id Pine.LNX.4.44.0308281001060.31606-100000@zigo.dhs.org
обсуждение исходный текст
Ответ на Re: mysql's last_insert_id  (Bo Lorentsen <bl@netgroup.dk>)
Ответы Re: mysql's last_insert_id  (Bo Lorentsen <bl@netgroup.dk>)
Список pgsql-general
On 28 Aug 2003, Bo Lorentsen wrote:

> Now ... I know that its possible to omit the oid's from large tables,
> and then this method will not work anymore. What to do in this case
> still eludes me (Anyone ?) :-)

Yes, never use the oid at all is my suggestion.

If you need a unique id for a row then add a serial column that will
provide that, and use currval('the_sequence') to get the last inserted
value in that column for a session.

--
/Dennis


В списке pgsql-general по дате отправления:

Предыдущее
От: "Keow Yeong Huat Joseph"
Дата:
Сообщение: Re: Postgresql for Solaris on Sparc
Следующее
От: "Andrew L. Gould"
Дата:
Сообщение: Re: Question Join/Subselect