Selecting a Random Row from Table in MySQL
Here the simplest way of selecting random rows from the MySQL database with using "ORDER BY RAND()" clause in the query.
[View All Snippets]
[View All Snippets]
Show Plain Text »
- SELECT * FROM TABLE
- ORDER BY RAND()
- LIMIT 1