Get data in random order with limit from table using mysql

You can get data in random order with a limit from the table using MySQL. You can use the order by rand method with the limit to get the records in random order with specific number from a particular table

Answers 1
  • Get records in random order with limit in mysql

    SELECT * FROM users ORDER BY RAND() LIMIT 10
    
    0

    Sometimes you need to get the records in random order with a specific number. So you can use the order by rand() method with the limit in MySQL to get the records in random order with a limit from the users table.

  • Back to code snippet queries related sql