Sunday, December 4, 2011

sql random row generate

The simplest way of selecting random rows from the MySQL database is to use "ORDER BY RAND()" clause in the query. Solution 1 [SQL] SELECT * FROM `table` ORDER BY RAND() LIMIT 0,1;