| From: | Kovacs Zoltan <kovacsz(at)pc10(dot)radnoti-szeged(dot)sulinet(dot)hu> |
|---|---|
| To: | "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 14:37:20 |
| Message-ID: | Pine.LNX.4.21.0104111630350.3812-100000@pc10.radnoti-szeged.sulinet.hu |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
> 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Najm Hashmi | 2001-04-11 15:07:38 | \i command |
| Previous Message | Poul L. Christiansen | 2001-04-11 13:29:39 | Re: enumerating rows |