Sunday, 21 April 2013

Selecting a Random Row from Table in MySQL


SELECT * FROM TABLE
ORDER BY RAND()
LIMIT 1

No comments:

Post a Comment