How to randomly order or select rows in a MySQL query
October 28th, 2008 | by Knix | published in mysql
I was looking for a way to order the rows randomly in a MySQL query and the solution was not easy for me to come by. I am posting the solution here in hopes of helping others.
1
2
3
SELECT *
FROM my_table
ORDER BY RAND()
RAND() returns a random floating-point value but functions to randomly order the selection [...]