w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Does MySQL "SELECT LIMIT 1" with multiple records select first record from the top?

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.





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.