Re: Last record

From: "omid omoomi" <oomoomi(at)hotmail(dot)com>
To: pgsql-sql(at)postgreSQL(dot)org
Subject: Re: Last record
Date: 2002-07-25 16:48:25
Message-ID: F228WjOuS5NUlle26UQ0001b93f@hotmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


select * from foo_table order by oid desc limit 1;

>From: Chris Ruprecht <chrup(at)earthlink(dot)net>
>To: "Leao Torre do Vale"
><elefante400(at)hotmail(dot)com>,<pgsql-sql(at)postgreSQL(dot)org>
>CC: Jan Wieck <JanWieck(at)Yahoo(dot)com>
>Subject: Re: [SQL] Last record
>Date: Wed, 24 Jul 2002 13:56:50 -0400
>
>Select * from <tablename> where <...> desc limit 1;
>
>Desc = from the bottom up, limit 1 = just one record.
>
>Best regards,
>Chris
>
>On Wednesday 24 July 2002 10:36 am, Leao Torre do Vale wrote:
> > Dear Sir,
> >
> > If you already have the answer of the question below please, send to me.
> >
> > Best Regards
> >
> > Leao
> >
> > Maputo - Mozambique
> >
> > How can select one field of last
> > record of table?
> >
> > (ex: SELECT LAST ....)
> >
> > Thanks
>
>---------------------------(end of broadcast)---------------------------
>TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org

_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx

Browse pgsql-sql by date

  From Date Subject
Next Message Nathan Suderman 2002-07-25 16:55:25 queries got slower using 7.1.3
Previous Message Robert Treat 2002-07-25 14:26:49 Re: how do I change regional setting for dates?