Re: Get the last record alone from the select statement. - Mailing list pgsql-novice

From A.Bhuvaneswaran
Subject Re: Get the last record alone from the select statement.
Date
Msg-id Pine.LNX.4.44.0307251521500.2337-100000@Bhuvan.bksys.co.in
Whole thread Raw
In response to Get the last record alone from the select statement.  (HK <harikrishnan@midascomm.com>)
Responses Re: Get the last record alone from the select statement.  (Ron Johnson <ron.l.johnson@cox.net>)
List pgsql-novice
> Hi all,
>   I have a doubt in limit clause. With limit and offset i can get the
> first few records from the select statement. Suppose i want to get the
> last record alone from the select, how can i achieve it.

=> select your_fields from your_table where your_condition order by
oid desc limit 1;

regards,
bhuvaneswaran


pgsql-novice by date:

Previous
From: Dag Gullberg
Date:
Subject: Re: question about images
Next
From: papapep
Date:
Subject: Re: Questions about Exists-Not exists clause