From: K.T. <kanet@calmarconsulting.com>
To: hoelc@pd.jaring.my
To: pgsql-interfaces@postgreSQL.org
Cc: pgsql-admin@postgreSQL.org
Cc: pgsql-general@hub.org
Subject: Re: [GENERAL] the last row in a table
Date: Tue, 9 Mar 1999 09:23:35 -0500
Message-ID: <000901be6a38$6e0840a0$38dba5ce@p2-400-death> (raw)
How about...
select field1 where primary_key = select max(primary_key) from table;
or something like that :) I always mess up the parenthesis...cant remember
whether or not they are needed here around the second select.
-----Original Message-----
From: hoelc <hoelc@pd.jaring.my>
To: pgsql-interfaces@postgreSQL.org <pgsql-interfaces@postgreSQL.org>
Cc: pgsql-admin@postgreSQL.org <pgsql-admin@postgreSQL.org>;
pgsql-general@hub.org <pgsql-general@hub.org>
Date: Tuesday, March 09, 1999 7:03 AM
Subject: [GENERAL] the last row in a table
>Hello,
>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?
>Thank you.
>Regards,
>lch
>
>
>
>
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-interfaces@postgresql.org
Cc: kanet@calmarconsulting.com, hoelc@pd.jaring.my, pgsql-admin@postgreSQL.org, pgsql-general@hub.org
Subject: Re: [GENERAL] the last row in a table
In-Reply-To: <000901be6a38$6e0840a0$38dba5ce@p2-400-death>
* 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