Re: reading last inserted record withoud any autoincrement field

From: Osvaldo Kussama <osvaldo(dot)kussama(at)gmail(dot)com>
To: m_qoreishy(at)yahoo(dot)com
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: reading last inserted record withoud any autoincrement field
Date: 2009-10-04 18:37:40
Message-ID: 690707f60910041137l340d2873le86d8f3458188471@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-sql

2009/10/4 mohammad qoreishy <m_qoreishy(at)yahoo(dot)com>
>
> How can get last inserted record in a table without any autoincrement filed?
> I need to  frequently fetch the last inserted record.
> If I must use the "Cursor" please explain your solution.
>

RETURNING clause?
http://www.postgresql.org/docs/current/interactive/sql-insert.html

Osvaldo

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Rob Sargent 2009-10-04 19:34:20 Re: reading last inserted record withoud any autoincrement field
Previous Message Tom Lane 2009-10-04 15:00:36 Re: Common table expression - parsing questions