Does Postgresql have a similar pseudo-column "ROWNUM" as Oracle?

From: <Dennis(dot)Jiang(at)thomson(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Cc: <Dennis(dot)Jiang(at)thomson(dot)com>
Subject: Does Postgresql have a similar pseudo-column "ROWNUM" as Oracle?
Date: 2005-05-12 19:07:00
Message-ID: DCD4903594CCF34CAFE200BDF3448D8D5B291A@tshuscodenmbx01.ERF.THOMSON.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php pgsql-sql

Hi:

Oracle has a pseudo-column "ROWNUM" to return the sequence number in which a row was returned when selected from a table. The first row ROWNUM is 1, the second is 2, and so on.

Does Postgresql have a similar pseudo-column "ROWNUM" as Oracle? If so, we can write the following query:

select *
from (select RowNum, pg_catalog.pg_proc.*
from pg_catalog.pg_proc) inline_view
where RowNum between 100 and 200;

Thanks,
Dennis

Responses

Browse pgsql-php by date

  From Date Subject
Next Message SG Edwards 2005-05-13 09:55:12 Printing off the page....
Previous Message Volkan YAZICI 2005-05-11 07:26:00 Fwd: Bug #32904 [Opn->Csd]: pg_get_notify() ignores result_type param.

Browse pgsql-sql by date

  From Date Subject
Next Message subhash 2005-05-12 21:01:17 md5 in pg_shadow?
Previous Message Dmitri Bichko 2005-05-10 21:53:59 Re: interesting SQL puzzle - concatenating column with itself.