aspose file tools
The moose likes JDBC and the fly likes sql for select intermediate rows Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » JDBC
Reply Bookmark "sql for select intermediate rows" Watch "sql for select intermediate rows" New topic
Author

sql for select intermediate rows

Samanthi perera
Ranch Hand

Joined: Jan 08, 2010
Posts: 510
there are 10 rows in student tablei need to get 5 th and 6 th rows.
1)how can i get these rows using select query
2)is there any other way to get other than select query?
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6322

Use Rownum or equivalent

What database is this


SCJP 6 articles - SCJP 5/6 mock exams - SCJP Mocks - SCJP 5 Mock exam (Word document ) - SCJP 5 Mock exam in Java.Inquisition format
Samanthi perera
Ranch Hand

Joined: Jan 08, 2010
Posts: 510
MySql ?
Samanthi perera
Ranch Hand

Joined: Jan 08, 2010
Posts: 510
i think we can't use rownum to get middle records?
harilal ithikkat
Ranch Hand

Joined: Oct 06, 2008
Posts: 221


This will display the first 10 results from the database.


This will show records 6, 7, 8, 9, and 10


SCJP 1.5
"A candle looses nothing by lighting another candle"
itechmentors.com
 
 
subject: sql for select intermediate rows
 
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com