Skip site navigation (1) Skip section navigation (2)

placing position numbers on a query output

From: "Oliveiros Cristina" <oliveiros(dot)cristina(at)marktest(dot)pt>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: placing position numbers on a query output
Date: 2007-04-11 15:50:17
Message-ID: 00a801c77c51$1a177a90$ec5a3d0a@marktestcr.marktest.pt (view raw or flat)
Thread:
Lists: pgsql-novice
Hello, All,

I would like to know if Postgres has a function similar to ROW_NUMBER().
I would like that the output of a query looked something like this

     column1   column2
1       x1              x2
2       y1              y2
3       z1              z2
...

I suspect that my question has an easy and quick answer, but from my searches I couldn't find it yet :-(

Any help deeply appreciate

Best,
Oliveiros

In response to

Responses

pgsql-novice by date

Next:From: AndreasDate: 2007-04-12 03:33:30
Subject: server variables ?
Previous:From: RegiDate: 2007-04-11 09:40:10
Subject: Install question

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group