From: Andrew Sullivan <ajs@crankycanuck.ca>
To: pgsql-sql@postgresql.org
Subject: Re: Serial number of a record
Date: Tue, 15 May 2007 09:36:22 -0400
Message-ID: <20070515133622.GB631@phlogiston.dyndns.org> (raw)
In-Reply-To: <380-220075215114025163@M2W015.mail2web.com>
References: <380-220075215114025163@M2W015.mail2web.com>
On Tue, May 15, 2007 at 07:40:25AM -0400, ashok@kalculate.com 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 | ajs@crankycanuck.ca
The whole tendency of modern prose is away from concreteness.
--George Orwell
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-sql@postgresql.org
Cc: ajs@crankycanuck.ca
Subject: Re: Serial number of a record
In-Reply-To: <20070515133622.GB631@phlogiston.dyndns.org>
* 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