mysql random

Solutions on MaxInterview for mysql random by the best coders in the world

showing results for - "mysql random"
Claudio
01 Aug 2017
1SELECT name
2  FROM random AS r1 JOIN
3       (SELECT CEIL(RAND() *
4                     (SELECT MAX(id)
5                        FROM random)) AS id)
6        AS r2
7 WHERE r1.id >= r2.id
8 ORDER BY r1.id ASC
9 LIMIT 1