i have 1000 records in resultset, how to get first 100
records from resultset, because resultset fetch all 1000
records at a time?
Answer Posted / sumit
The question is not pretty clear. However, before retriving the records from the database if you want to make sure you get only 100 records in one hit. U can use the following API after creating the statement object.
Statement.setFetchSize(100);
| Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
What is a datasource in java?
Can we have foreign key reference to a non primary key column ?
What is meant by dao?
Why hibernate is better than jdbc?
What does jdbc setmaxrows method do?
What are the benefits of PreparedStatement over Statement?
Explain about DSN?
Explain different types of locks in jdbc?
What are clob and blob data types in jdbc?
What does setautocommit do?
How vendor Naming registry supports JNDI?
What is addbatch jdbc?
How to move the cursor in scrollable resultset ?
Why would you use setautocommit(false) in jdbc?
What is JDBC RowSet? What are different types of RowSet?