Skip site navigation (1) Skip section navigation (2)

Re: Getting The Last Entry

From: Luiz Eduardo Cantanhede Neri <lecneri(at)gmail(dot)com>
To: postgresql novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Getting The Last Entry
Date: 2010-09-10 15:49:17
Message-ID: AANLkTim=CsCmhcFrGQJyoQ-+zk2vfi8cfLGuaJ0f59Fb@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-novice
Once I suggested to use oid, but some guys here said was a poor design.

On Fri, Sep 10, 2010 at 12:33 PM, Thom Brown <thom(at)linux(dot)com> wrote:

> On 10 September 2010 16:31, Francisco Leovey <fleovey(at)yahoo(dot)com> wrote:
> >
> > if by "last" you mean the last row inserted, use
> >
> > select *,oid from table order by oid DESC limit 1
> >
> > (asuming you use OID's)
>
> (copying in list with your response)
>
> --
> Thom Brown
> Twitter: @darkixion
> IRC (freenode): dark_ixion
> Registered Linux user: #516935
>
> --
> Sent via pgsql-novice mailing list (pgsql-novice(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-novice
>

In response to

Responses

pgsql-novice by date

Next:From: Francisco LeoveyDate: 2010-09-10 17:12:53
Subject: Re: Getting The Last Entry
Previous:From: Thom BrownDate: 2010-09-10 15:33:28
Subject: Re: Getting The Last Entry

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group