Select a random row from a table
Posted on December 22, 2007
Filed Under SQL | Leave a Comment
I was looking for a clean and simple way of selecting a random record from a table. Here is what I found…
1 | SELECT * FROM TABLE ORDER BY RAND() LIMIT 1 |
Posted on December 22, 2007
Filed Under SQL | Leave a Comment
I was looking for a clean and simple way of selecting a random record from a table. Here is what I found…
1 | SELECT * FROM TABLE ORDER BY RAND() LIMIT 1 |