Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Post History
Let's say I have a table with 10,000 rows and instead of selecting all of the rows at once I select 1,000 at a time like LIMIT 0,1000 LIMIT 1000,1000 etc. Without an ORDER BY statement the or...
#2: Post edited
Let's say I have a table with 10,000 rows and instead of selecting all of the rows at once select 1,000 at a time like- ```
- LIMIT 0,1000
- LIMIT 1000,1000
- ```
- etc.
- Without an ORDER BY statement the order of results in MySQL is not guaranteed, could I possibly miss records if I do not specify a column to ORDER BY?
- Let's say I have a table with 10,000 rows and instead of selecting all of the rows at once I select 1,000 at a time like
- ```
- LIMIT 0,1000
- LIMIT 1000,1000
- ```
- etc.
- Without an ORDER BY statement the order of results in MySQL is not guaranteed, could I possibly miss records if I do not specify a column to ORDER BY?
#1: Initial revision
Is an ORDER BY required when looping through MySQL records with LIMIT?
Let's say I have a table with 10,000 rows and instead of selecting all of the rows at once select 1,000 at a time like ``` LIMIT 0,1000 LIMIT 1000,1000 ``` etc. Without an ORDER BY statement the order of results in MySQL is not guaranteed, could I possibly miss records if I do not specify a column to ORDER BY?