The method is roughly three: 1 :) Use Next () method: (most common method) Select from 50-100 line int currentrow = 1; int minRow = 50; int maxRow = 100; while (rs.next ()) { IF (currentrow 50 and TT.R <= 100; DB2: Select * from payment fetch first 5 row only - Top 5 records (only support in DB2) The above form, only one of the previous N, not supported N, this experience, I have received IBM confirmation) test speed: Abslute () The slower; I can't stand it after 10,000! Next (); a few days ago, the slower the next time! SQLSERVER statement, much faster than NEXT, but also getting more slower! Oracle statement, the fastest! Almost unreffected by the number of strips! (This is mainly due to the powerful performance of Oracle)