Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

If i want to fetch 100 rows first and then begin retrieve data normally.is the statement listed below correcttly?

Data fetch rows
0
10 Posted

If i want to fetch 100 rows first and then begin retrieve data normally.is the statement listed below correcttly?

0
10

myResultSet.setFetchSize(100); if(!myResultSet.fecth()) return false; myResultSet.setFetchSize(1); while(myResultSet.fetch()) { //do something. } BTW : If u want to retrieve the first n rows only,u can use the sql clause defined by special provider.such as “limit ” to mysql . “fetch frist n rows only ” to db2 and “rownum <= n" to oracle. I have a weak english.and i am so weak.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123