If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Select Statement: Limiting Number Of Rows

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-16-03, 05:15
stenx stenx is offline
Registered User
 
Join Date: Dec 2003
Posts: 12
Select Statement: Limiting Number Of Rows

Hi,
how can i do to limit the number
of rows retrieved in a select statement?

For example in sybase there is "set rowcount" command.

Thank you.
Reply With Quote
  #2 (permalink)  
Old 12-16-03, 05:46
Ravi Ravi is offline
Registered User
 
Join Date: Jul 2001
Location: Bangalore, India
Posts: 28
"select * from table1 fetch first n rows"
Reply With Quote
  #3 (permalink)  
Old 12-16-03, 08:50
stenx stenx is offline
Registered User
 
Join Date: Dec 2003
Posts: 12
Thanks for your reply.

Your code works perfectly.
But I want ask you another question:

I have a java web application that retrives a large amount of data that are display like lists and charts.
I want to know if there's a possibility of managing this data little by little
without load all in session.
Now my list loads the entire resultSet in session and display only
20 rows at time using back and forward utility, but the memory space grows too much.

Can you help me?
Thanks Stenx
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On