generate 6 digit unique random number in mysql code example
Example: how to generate a unique random number in mysql
#query
SELECT FLOOR(RAND() * 99999)
AS random_num
FROM YourTableName
WHERE "random_num"
NOT IN (
SELECT YourColumnName FROM YourTableName) LIMIT 1