Does MySQL "SELECT LIMIT 1" with multiple records select first record from the top?

You need an ORDER BY clause to define the ordering between the individual records your table. If you do not use ORDER BY you can assume no fixed order between the records, and you could get a new order each time you executed the query.


From the manual:

With one argument, the value specifies the number of rows to return from the beginning of the result set

So with LIMIT 1 you get the first row from the result set. What the result set is depends on engine used and which indexes you have. If you want the first row added, you need to create another column to define that.


It just gets one at random*. There's no way to tell which one it will be, unless you add an ORDER BY clause.

* Not really at random, of course. It depends on the way the records are stored and repeated queries will probably return the same result every time, at least as long as you don't modify the table or its contents. I actually mean, you cannot be sure.