生成唯一随机数
# 非补0版本
SELECT FLOOR(100000 + RAND() * 899999) AS random_number
FROM target_table
WHERE "unique_field" NOT IN (SELECT unique_field FROM target_table)
LIMIT 1
# 补0版本
SELECT LPAD(FLOOR(RAND() * 999999), 6, 0) AS random_number
FROM target_table
WHERE "unique_field" NOT IN (SELECT unique_field FROM target_table)
LIMIT 1