Reputation:
i have over 1000 rows of data in a mysql table and i want to process theme 50 rows at a time using my java program.The program has so many deletions and insertions,i am not even sure the first record starts at 1.
When using mysql limit SELECT * FROM table LIMIT 0, 10
should this be read as first 10 records and does the incremented id feature in LIMIT 0, 10
?.
Thanks.
Upvotes: 0
Views: 37
Reputation: 18600
There is no surity to read first 10 record by following query
SELECT * FROM table LIMIT 0, 10
If you want to read first 10 record then use following query with order by
clause like
SELECT * FROM table ORDER BY id LIMIT 0, 10
Upvotes: 1