Get a random record in MySQL

by Vinoth 2009-02-23 20:00:59

To select a random record from mysql table we can use RAND();
For Example:
select * from table_name orderby RAND() limit 0,1;

Tagged in:

1584
like
0
dislike
0
mail
flag

You must LOGIN to add comments