Select Random Set Of Records from Mysql
To select a random set of records from mysql, use the following statement:
SELECT * FROM table_name ORDER BY RAND() limit 5;
A random set of 5 records should be returned by the query.
Select Random Set Of Records from Mysql
To select a random set of records from mysql, use the following statement:
SELECT * FROM table_name ORDER BY RAND() limit 5;
A random set of 5 records should be returned by the query.
The URI to TrackBack this entry is: http://jdev.blogsome.com/2007/06/25/select-random-set-of-records-from-mysql/trackback/
No comments yet.
RSS feed for comments on this post.
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>