sql - Get 1000 row set from Oracle table -


this question has answer here:

i want select 1000 rows @ time using query:

select * memberid_1m rownum <1000 

how next set of 1000 rows table in loop?

i suggest use row_number() function this: (my id pk)

select m.*  (     select memberid_1m.*, row_number() on (order id) rn     memberid_1m ) m      (rn <= 1000) 

and next:

select m.*  (     select memberid_1m.*, row_number() on (order id) rn     memberid_1m ) m      (rn > 1000) , (rn <= 2000) 

for page :i:

select m.*  (     select memberid_1m.*, row_number() on (order id) rn     memberid_1m ) m      (rn > :i * 1000) , (rn <= (:i + 1) * 1000) 

Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -