| Author |
can i display only first few records from oracle sql
|
srinivas sv
Greenhorn
Joined: Oct 04, 2003
Posts: 13
|
|
helo to everyone on javaranch, i am using oracle as a backend on j2ee, they r about 1000 records my sql query retreives. Since storing 1000 records at the server side will increase the burden on server i want to display only firt 50 and then next 50 upon the client request. Is there any provision in oracle sql using which i can retrieve only first few records then next few records. thanx in advance
|
 |
Leslie Chaim
Ranch Hand
Joined: May 22, 2002
Posts: 336
|
|
Use ROWNUM for that.. select ... from ... where ... and rownum < 50
|
Normal is in the eye of the beholder
|
 |
srinivas sv
Greenhorn
Joined: Oct 04, 2003
Posts: 13
|
|
thanx for reply, They r many columns which have to be retreived will the use of rownum will effect the performance.
|
 |
yogesh sood
Ranch Hand
Joined: Aug 31, 2000
Posts: 108
|
|
Hi there, I think there is no performance issue as rownum is generated for each record when you run SQL QUery therefore when 1000 records are returned from server then each one is given a unique id even though you do not use it only performance concern is that last Where clause which i dont think will take much of the query excecution time. Any suggestions
|
If its green its biology if its stinkks its chemistry if it has numbers it is Maths and if it doesn't work its TECHNOLOGY
|
 |
 |
|
|
subject: can i display only first few records from oracle sql
|
|
|