This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

get a limited no of records

 
kevin Johnson
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,
resultSet.next gives me all the rows from the table. Is there any way to limit the no of records say only 10??
Thanx.
kevin

// print out records

while(resultSet.next())
{
//String[] row = new String[columnCount];
for(int i=1; i<columnCount+1; i++) {>
entry = resultSet.getString(i) + ",";
System.out.println(entry);
}

 
Daniel Dunleavy
Ranch Hand
Posts: 276
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
setFetchsize
or in Oracle you can have ROWNUM < 11 in the where clause
Dan
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic