Programming Code Examples

MySQL SELECT Random Record from Table1 min read

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:

 

Add comment