How can I get the last serial I inserted?

From: <database(at)gurubase(dot)com>
To: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: How can I get the last serial I inserted?
Date: 2000-07-23 06:26:36
Message-ID: 964333596.397a901c61af6@mail.gurubase.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dear all,

I would like to insert a row into a table with serial type id as other table's
reference key. After that insert, I would use the inserted serial to insert
into another table.

The problem is how can I find that serial value and ensuring other is inserting
at the same time?

Best regards,
Boris

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alex Bolenok 2000-07-23 06:49:15 Re: How can I get the last serial I inserted?
Previous Message Manuel Lemos 2000-07-23 05:50:37 Re: Can't put sub-queries values in queries results?