pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Last record
4+ messages / 4 participants
[nested] [flat]

* Last record
@ 2002-07-24 14:36 Leao Torre do Vale <elefante400@hotmail.com>
  2002-07-24 17:42 ` Re: Last record Jan Wieck <JanWieck@Yahoo.com>
  2002-07-24 17:56 ` Re: Last record Chris Ruprecht <chrup@earthlink.net>
  0 siblings, 2 replies; 4+ messages in thread

From: Leao Torre do Vale @ 2002-07-24 14:36 UTC (permalink / raw)
  To: pgsql-sql

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

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Last record
  2002-07-24 14:36 Last record Leao Torre do Vale <elefante400@hotmail.com>
@ 2002-07-24 17:42 ` Jan Wieck <JanWieck@Yahoo.com>
  1 sibling, 0 replies; 4+ messages in thread

From: Jan Wieck @ 2002-07-24 17:42 UTC (permalink / raw)
  To: Leao Torre do Vale <elefante400@hotmail.com>; +Cc: pgsql-sql

Leao Torre do Vale wrote:

> How can select one field of last
> record of table?

There is no such thing as the "last record of a table" in SQL. Somehow
you must be able to describe what you mean with "last record" and how to
identify that. This would then be translated into a qualification (WHERE
clause) and is the answer to your question.


Jan

-- 

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Last record
  2002-07-24 14:36 Last record Leao Torre do Vale <elefante400@hotmail.com>
@ 2002-07-24 17:56 ` Chris Ruprecht <chrup@earthlink.net>
  1 sibling, 0 replies; 4+ messages in thread

From: Chris Ruprecht @ 2002-07-24 17:56 UTC (permalink / raw)
  To: Leao Torre do Vale <elefante400@hotmail.com>; pgsql-sql; +Cc: Jan Wieck <JanWieck@Yahoo.com>

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



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Last record
@ 2002-07-25 16:48 omid omoomi <oomoomi@hotmail.com>
  0 siblings, 0 replies; 4+ messages in thread

From: omid omoomi @ 2002-07-25 16:48 UTC (permalink / raw)
  To: pgsql-sql


select * from foo_table order by oid desc limit 1;



>From: Chris Ruprecht <chrup@earthlink.net>
>To: "Leao Torre do Vale" 
><elefante400@hotmail.com>,<pgsql-sql@postgreSQL.org>
>CC: Jan Wieck <JanWieck@Yahoo.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@postgresql.org




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




^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2002-07-25 16:48 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-07-24 14:36 Last record Leao Torre do Vale <elefante400@hotmail.com>
2002-07-24 17:42 ` Jan Wieck <JanWieck@Yahoo.com>
2002-07-24 17:56 ` Chris Ruprecht <chrup@earthlink.net>
2002-07-25 16:48 Re: Last record omid omoomi <oomoomi@hotmail.com>

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