X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id CD5D9474E4F for ; Thu, 13 Feb 2003 11:21:53 -0500 (EST) Received: from web14805.mail.yahoo.com (web14805.mail.yahoo.com [216.136.224.221]) by postgresql.org (Postfix) with SMTP id 07128474E42 for ; Thu, 13 Feb 2003 11:21:53 -0500 (EST) Message-ID: <20030213162156.26511.qmail@web14805.mail.yahoo.com> Received: from [66.139.15.154] by web14805.mail.yahoo.com via HTTP; Thu, 13 Feb 2003 08:21:56 PST Date: Thu, 13 Feb 2003 08:21:56 -0800 (PST) From: Mintoo Lall Subject: Generating serial number column To: pgsql-sql@postgresql.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1311788996-1045153316=:25985" X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/288 X-Sequence-Number: 11686 --0-1311788996-1045153316=:25985 Content-Type: text/plain; charset=us-ascii 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 --0-1311788996-1045153316=:25985 Content-Type: text/html; charset=us-ascii 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 &nb sp;              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 --0-1311788996-1045153316=:25985--