MySQL: Alternatives to ORDER BY RAND()

前端 未结 7 1776
情歌与酒
情歌与酒 2020-11-22 02:46

I\'ve read about a few alternatives to MySQL\'s ORDER BY RAND() function, but most of the alternatives apply only to where on a single random result is needed.

7条回答
  •  鱼传尺愫
    2020-11-22 03:13

    Create a column or join to a select with random numbers (generated in for example php) and order by this column.

提交回复
热议问题