This question has already been answered:

There is a table of transport. There are 30 entries that I should receive at random. Every time when I open the page, there should be a query to the database where I get 10 records out of 30 randomly. How to do it on MySQL?

Reported as a duplicate by Dmitriy Simushev , Mike , aleksandr barakin , Grundy , Athari 19 Apr '16 at 21:09 .

A similar question was asked earlier and an answer has already been received. If the answers provided are not exhaustive, please ask a new question .

  • Doesn't ORDER BY RAND() anymore? - Dmitriy Simushev

1 answer 1

Request

 SELECT column FROM table ORDER BY RAND() LIMIT 10 
  • Why minus? ORDER BY rand () is relevant if not, write your answer. - wwwplaton
  • I agree, thank you - Invision