Re: Get last serial (autoincrement) value
От
Bruno Wolff III
Тема
Re: Get last serial (autoincrement) value
Дата
Msg-id
20030901190122.GA1782@wolff.to
Ответ на
Get last serial (autoincrement) value (Andrei Verovski (aka MacGuru))
Список
Дерево обсуждения
Get last serial (autoincrement) value Andrei Verovski (aka MacGuru) <andreil1@mail.starlett.lv>
Re: Get last serial (autoincrement) value Bruno Wolff III <bruno@wolff.to>
Re: Get last serial (autoincrement) value Frank Bax <fbax@sympatico.ca>
On Mon, Sep 01, 2003 at 13:34:32 +0300, Andrei Verovski wrote: > > Anyone knows how to obtain last inserted serial (autoincrement) id? I > am currently using "SELECT id FROM table_name ORDER BY id DESC", and > then retrieve first row and desired value. How you want to do this, depends on what you what to do with the number. Normally if you just inserted a record that would create a new id and you want to use that id to enter in another table, then you want to call currval.
В списке pgsql-php по дате отправления