Meaningless Drivel is fun!*
The moose likes JDBC and the fly likes sql for select intermediate rows Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » JDBC
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: 6657
    
    5

Use Rownum or equivalent

What database is this


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: sql for select intermediate rows
 
Similar Threads
Correct sintax to order dependent objects
Optional join of tables
Extra rows when displaying resultSet in browser
JSP-Refresh
Diplaying top five employee names taking highest salary