Re: Getting a random row
От | Shaul Dar |
---|---|
Тема | Re: Getting a random row |
Дата | |
Msg-id | 234efe30910130842q332d8297vccd2ace29deab29a@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Getting a random row (Michael Glaesemann <grzm@seespotcode.net>) |
Список | pgsql-performance |
Michael,
You are right. I didn't remember the semantics, and Oracle's rownum would not have been helpful. But the new row_number() in 8.4 would probably do the trick (though I use 8.3.7 :-( )
-- Shaul
You are right. I didn't remember the semantics, and Oracle's rownum would not have been helpful. But the new row_number() in 8.4 would probably do the trick (though I use 8.3.7 :-( )
-- Shaul
2009/10/13 Michael Glaesemann <grzm@seespotcode.net>
On Oct 13, 2009, at 11:19 , Grzegorz Jaśkiewicz wrote:Also PG does not have a concept of an auto-increment pseudo-column likenot true - it has sequences, and pseudo type serial. Rtfm!.
Oracle's "rownum". Any suggestions?
AIUI, rownum applies numbering to output rows in a SELECT statement, rather than some actual column of the table, which is likely what the OP is getting at.
http://www.oracle.com/technology/oramag/oracle/06-sep/o56asktom.html
Michael Glaesemann
grzm seespotcode net
В списке pgsql-performance по дате отправления: