row numbering - Mailing list pgsql-general

From josue
Subject row numbering
Date
Msg-id 421FAA6A.1090606@lamundial.hn
Whole thread Raw
Responses Re: row numbering  (Peter Eisentraut <peter_e@gmx.net>)
Re: row numbering  (Greg Stark <gsstark@mit.edu>)
Re: row numbering  (Jeff Davis <jdavis-pgsql@empires.org>)
Re: row numbering  (Scott Marlowe <smarlowe@g2switchworks.com>)
List pgsql-general
Hello list,

is there a way return a column with the row number automatically
generated according the way the rows were processed by the query.

For instance:
select a,b from foo;
a  b
20 yes
40 no
15 yes

to something like:

select counter(),a,b from foo;
counter a  b
1    20 yes
2    40 no
3    15 yes

Thanks in advance,


--
Sinceramente,
Josué Maldonado.

... "El bien supone la luz, el mal tinieblas. Cada vez hay menos
iluminación."

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Questions regarding notify processing.
Next
From: Si Chen
Date:
Subject: postgresql 8.0 on windows 2003 server