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 / chandra

There is two ways to getting the limited records from the
DB.
1)we can use sql command :
set rowcount 100 select * from mytab.

2)Instead of set rowcount you can use setMaxRow(100) method.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is jdbc an api?

507


What do you understand by jdbc statements?

513


What are the advantages of using jdbc datasource?

491


What does setautocommit do?

553


What are the different types of JDBC drivers?

615






How can I determine where a given table is referenced via foreign keys?

551


How to get the Database server details in java program?

571


Give an example for getXXX method?

555


Explain the difference between rowset vs. Resultset in jdbc?

575


What are the components of jdbc?

538


Is jdbctemplate thread safe?

482


How to move the cursor in scrollable resultset ?

571


What is jdbc driver in java?

508


What is jdbc thin client?

503


What are the different types of statements? How we can you use preparedstatement.

509