Re: oracle rownum equivalent? - Mailing list pgsql-sql

From mikeo
Subject Re: oracle rownum equivalent?
Date
Msg-id 3.0.1.32.20000607101423.00930360@pop.spectrumtelecorp.com
Whole thread Raw
In response to Re: oracle rownum equivalent?  (Ed Loehr <eloehr@austin.rr.com>)
List pgsql-sql
thanks for the response.  oid is equivalent to oracle rowid.
rownum can be used similar to the limit option of select in postgres
but in oracle it can also be used in a where clause, or as an assigment
in an update statement for instance.

eg: update ctmaster set bsc_id = mod(rownum,3) +1;

this gives me a way to assign streams to rows in a load balanced manner
on the fly, for example.  i use it in other more involved ways than this
also.  i cannot do this with limit.  i could do this with sequence with
a max value but i'd have to define a sequence each time i wanted to do
something "on the fly" or for what ifs.

what i'm also interested in is how to find reference to these type of
pseudo-columns, even just the names of them, if they're listed somewhere.

thanks again,
       mikeo

At 08:29 AM 6/7/00 -0500, Ed Loehr wrote:
>mikeo wrote:
>>
>> is there an equivalent to rownum in oracle?
>>
>> also, where can one find reference to "hidden columns"
>> such as OID or, as in oracle, rownum?
>
>oid is the equivalent.  not sure documentation exists for these...
>
>Regards,
>Ed Loehr
>

pgsql-sql by date:

Previous
From: Ed Loehr
Date:
Subject: Re: how to know when a table is altered
Next
From: Niall Smart
Date:
Subject: Problem with subquery in CHECK constraint.