Is it possible to fetch records in parts?
Following will return 10,000 rows from my db:
Select * from languages
I want to create the select statement that on press of a button it fetches first 1000 rows, then click a button and it fetch next 1000 rows.
Ho开发者_如何学JAVAw can I do it?
You can use the LIMIT {offset}, {row count}
clause.
This will return the first 1000 records
Select * from languages LIMIT 0,1000
To get the next 1000 records
Select * from languages LIMIT 1000,1000
are you just looking for the LIMIT clause? eg. select * from languages limit 1,1000
-- later get the next 1000
select * from languages limit 1001, 1000
精彩评论