I am new to MySQL, but I have used Oracle for some time. I am a little confused about MySQL's LIMIT keyword. Does this keyword imply that the order of the returned data will be the same every time the query is executed? What if more data is added to the tables that affect the query? And how would the data be ordered if no order-by clause exists?
解决方案
No, LIMIT is non-deterministic. The ordering depends on the data, what indexes are used, internal changes between mysql versions, order of data on disk etc.
Usually you'd combine LIMIT with an ORDER BY to avoid this.