Mysql default sort

there has just been a problem with the online code. The reason is that order sorting is not used in sql, resulting in inconsistent results of each query. So what is the default collation for mysql without specifying order by?

Dec.17,2021

the official declaration is: there is no order.

but if you do a simple test, you will find that it is basically related to the insert order, if you haven't had update and delete. It's equivalent to a storage location.

but the same query may return different results, depending on various states, optimizations, and so on.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eabb82-2078.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eabb82-2078.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?