pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mintoo Lall <tlqmail@yahoo.com>
To: pgsql-sql@postgresql.org
Subject: Generating serial number column
Date: Thu, 13 Feb 2003 08:21:56 -0800 (PST)
Message-ID: <20030213162156.26511.qmail@web14805.mail.yahoo.com> (raw)

Hi Everybody ,

Is there a way in postgresql by which I can generate serial number column for the
resultset. I wanted the resulset to look like below


sno             Name
-------------------
1                JOE
2                JOHN
3                MARY
4                LISA
5                ANN
6                BILL
7                JACK
8                WILL
9                GEORGE
10              NANCY
11               JANE
 .                    .
 .                    .
 .                    .

My query is basically select * name from tblcontact. I wanted to generate
the column "sno" which basically numbers each row returned. Any help is
appreciated.
Regards,
Tarun



---------------------------------
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day

view thread (2+ messages)  latest in thread

Message-ID: <20030213162156.26511.qmail@web14805.mail.yahoo.com>
Permalink:  ../20030213162156.26511.qmail@web14805.mail.yahoo.com/
Also on:    postgresql.org/message-id/20030213162156.26511.qmail@web14805.mail.yahoo.com

 · 

reply

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: tlqmail@yahoo.com
  Subject: Re: Generating serial number column
  In-Reply-To: <20030213162156.26511.qmail@web14805.mail.yahoo.com>

* 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