Re: enumerating rows

From: "Luis C(dot) Ferreira" <lferreira(at)ciudad(dot)com(dot)ar>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: enumerating rows
Date: 2001-04-12 06:05:36
Message-ID: 9b3g5k$1iq6$1@news.tht.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


Try this....

CREATE SEQUENCE just_a_seq;
Select nextval('just_a_seq') as row_no, * from pg_tables ;
drop SEQUENCE just_a_seq;

>
> row_no | column1 | column2 | ...
> -------+---------+---------+ ...
> 1 | datum11 | datum12 | ...
> 2 | datum21 | datum22 | ...
> ... | ... | ... | ...
>
> I didn't find anything in the docs.
>
> TIA, Zoltan
>

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Hans-Jürgen Schönig 2001-04-12 11:03:17 Bug in user management?
Previous Message Josh Berkus 2001-04-12 04:49:12 Re: Calling plSQL functions