From: | "Koen Antonissen" <Koen(at)Cee-Kay(dot)net> |
---|---|
To: | "Kovacs Zoltan" <kovacsz(at)pc10(dot)radnoti-szeged(dot)sulinet(dot)hu>, "Poul L(dot) Christiansen" <poulc(at)cs(dot)auc(dot)dk> |
Cc: | <pgsql-sql(at)postgresql(dot)org> |
Subject: | RE: enumerating rows |
Date: | 2001-04-11 15:56:52 |
Message-ID: | DD782DD61CF86144BD78DDC89D3D6124014928@gaea.home.dutchcentral.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
I was searching for the same thing, I couldn't found it though :(
-----Original Message-----
From: Kovacs Zoltan [mailto:kovacsz(at)pc10(dot)radnoti-szeged(dot)sulinet(dot)hu]
Sent: woensdag 11 april 2001 16:37
To: Poul L. Christiansen
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: [SQL] enumerating rows
> Use the "serial" column type.
Unfortunately it's not what I expect. Assume that I have an arbitrary
"SELECT expr1 as column1, expr2 as column2, ..." which gives
column1 | column2 | ...
--------+---------+- ...
......data..............
........................
I would like to get the same result with the only plus column row_no:
row_no | column1 | column2 | ...
-------+---------+---------+- ...
1 | ......data..............
2 | ........................
.................................
with a new SELECT statement: "SELECT ?????, expr1 as column1, expr2 as
column2, ...". What to write instead of ??????
TIA, Zoltan
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?
From | Date | Subject | |
---|---|---|---|
Next Message | Hans-Jürgen Schönig | 2001-04-11 16:29:04 | Dropping users with no name |
Previous Message | Najm Hashmi | 2001-04-11 15:07:38 | \i command |