1 -- http://explainextended.com/2009/05/06/oracle-row_number-vs-rownum/
5 id NUMBER(10) NOT NULL,
6 paginator NUMBER(10) NOT NULL,
11 ADD CONSTRAINT pk_mytable_id PRIMARY KEY (id);
14 CREATE INDEX ix_mytable_paginator_id ON mytable(paginator, id);
18 INTO mytable(id, paginator, `value`)
19 SELECT level, level / 10000, 'Value ' || level
26 SELECT t.*, ROW_NUMBER() OVER (ORDER BY paginator, id) AS rn
29 WHERE rn BETWEEN 900001 AND 900010;
33 SELECT t.*, ROWNUM AS rn
38 WHERE rn BETWEEN 900001 AND 900010;
42 SELECT t.*, ROWNUM AS rn