Comment générer un nombre aléatoire unique dans MySQL
#query
SELECT FLOOR(RAND() * 99999)
AS random_num
FROM YourTableName
WHERE "random_num"
NOT IN (
SELECT YourColumnName FROM YourTableName) LIMIT 1
Abhay Mishra