Search Postgresql Archives

row numbering

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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."

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@xxxxxxxxxxxxxx

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux