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
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
generate random & unique mysql string
DO
SELECT LEFT(UUID(), 8) INTO @var;
INSERT INTO col (@var);
WHILE there_is_a_unique_constraint_violation
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us