| From: | Andrew Sullivan <ajs(at)crankycanuck(dot)ca> |
|---|---|
| To: | pgsql-sql(at)postgresql(dot)org |
| Subject: | Re: Serial number of a record |
| Date: | 2007-05-15 13:36:22 |
| Message-ID: | 20070515133622.GB631@phlogiston.dyndns.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
On Tue, May 15, 2007 at 07:40:25AM -0400, ashok(at)kalculate(dot)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(at)crankycanuck(dot)ca
The whole tendency of modern prose is away from concreteness.
--George Orwell
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Gary Stainburn | 2007-05-15 14:09:40 | Re: workday function |
| Previous Message | Paul251 | 2007-05-15 13:17:26 | SQL Query Validate Records Multiple Tables - Help Needed |