To query records randomly, you can pass the RAND() function to the ORDER BY clause.
So that we now get only a random record, we can connect the ORDER BY with the LIMIT clause.
Example:
1 2 3 4 5 6 | SELECT * FROM mytable ORDER BY RAND() LIMIT 1 |
To query records randomly, you can pass the RAND() function to the ORDER BY clause.
So that we now get only a random record, we can connect the ORDER BY with the LIMIT clause.
Example:
1 2 3 4 5 6 | SELECT * FROM mytable ORDER BY RAND() LIMIT 1 |