Is there is any way to get the select Random Records using query from table in mySql.
Asked
Active
Viewed 75 times
2 Answers
2
How about something like
SELECT * FROM `table` ORDER BY RAND() LIMIT 0,1;
Adriaan Stander
- 156,697
- 29
- 278
- 282
0
SELECT * FROM `table` WHERE RAND() < 0.5
change the percentage to include more or less records. add a LIMIT clause to, well, limit to a maximum number of records
knittl
- 216,605
- 51
- 293
- 340