pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Osvaldo Kussama <osvaldo.kussama@gmail.com>
To: m_qoreishy@yahoo.com
Cc: pgsql-sql@postgresql.org
Subject: Re: reading last inserted record withoud any autoincrement field
Date: Sun, 4 Oct 2009 15:37:40 -0300
Message-ID: <690707f60910041137l340d2873le86d8f3458188471@mail.gmail.com> (raw)
In-Reply-To: <444951.51198.qm@web33806.mail.mud.yahoo.com>
References: <444951.51198.qm@web33806.mail.mud.yahoo.com>

2009/10/4 mohammad qoreishy <m_qoreishy@yahoo.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



view thread (4+ messages)  latest in thread

Message-ID: <690707f60910041137l340d2873le86d8f3458188471@mail.gmail.com>
Permalink:  ../690707f60910041137l340d2873le86d8f3458188471@mail.gmail.com/
Also on:    postgresql.org/message-id/690707f60910041137l340d2873le86d8f3458188471@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: osvaldo.kussama@gmail.com, m_qoreishy@yahoo.com
  Subject: Re: reading last inserted record withoud any autoincrement field
  In-Reply-To: <690707f60910041137l340d2873le86d8f3458188471@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox