PostgreSQL
 sql >> Datenbank >  >> RDS >> PostgreSQL

Rownum in postgresql

PostgreSQL> 8.4

SELECT 
    row_number() OVER (ORDER BY col1) AS i, 
    e.col1, 
    e.col2, 
    ... 
FROM ...