Re: [GENERAL] the last row in a table

Oleg Broytmann <phd@sun.med.ru>

From: Oleg Broytmann <phd@sun.med.ru>
To: hoelc <hoelc@pd.jaring.my>
Cc: pgsql-general@hub.org
Date: 1999-03-10T08:42:06Z
Lists: pgsql-general
Hi!

On Tue, 9 Mar 1999, hoelc wrote:
> I am developing a database with PostgreSQL in Linux, and using ecpg to write the
> C program to communicate with the database.
> One of my application need to get the data from the last row in a table.
> Is there any function or command that can tract which is the last row of data in
> a table?

   Reorder your query to get the data in the FIRST row and use cursor to fetch
just the row.

> Thank you.
> Regards,
> lch

Oleg.
---- 
    Oleg Broytmann  National Research Surgery Centre  http://sun.med.ru/~phd/
           Programmers don't die, they just GOSUB without RETURN.