Re: Serial number of a record - Mailing list pgsql-sql

From Andrew Sullivan
Subject Re: Serial number of a record
Date
Msg-id [email protected]
Whole thread Raw
In response to Serial number of a record  ("[email protected]" <[email protected]>)
List pgsql-sql
On Tue, May 15, 2007 at 07:40:25AM -0400, [email protected] wrote:
> Suppose if i will fire a query "select Name from tablename where age=30".
> it will give output "shyam" but i also want record no. other then oid, in
> this case it is 3.
> 
> is it possible?
> if yes then how?
> plz. help me.

This depends.  Does the record have a serialno field?  If not, you
can do it with a temporary sequence.  But you should be aware that
this "serial number" as you call it changes from result to result in
that case.

A

-- 
Andrew Sullivan  | [email protected]
The whole tendency of modern prose is away from concreteness.    --George Orwell


pgsql-sql by date:

Previous
From: "[email protected]"
Date:
Subject: Serial number of a record
Next
From: Gary Stainburn
Date:
Subject: Re: workday function