For PostgreSQL 8.4, You can use the below code: SELECT *. FROM (SELECT ROW_NUMBER() OVER (PARTITION BY section_id ORDER BY name) AS r,t.
確定! 回上一頁