I was searching for the same thing, I couldn't found it though :(

-----Original Message-----
From: Kovacs Zoltan [mailto:[EMAIL PROTECTED]]
Sent: woensdag 11 april 2001 16:37
To: Poul L. Christiansen
Cc: [EMAIL PROTECTED]
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?

http://www.postgresql.org/users-lounge/docs/faq.html

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Reply via email to