generate random & unique mysql string code example
Example: generate random & unique mysql string
DO
SELECT LEFT(UUID(), 8) INTO @var;
INSERT INTO col (@var);
WHILE there_is_a_unique_constraint_violation
DO
SELECT LEFT(UUID(), 8) INTO @var;
INSERT INTO col (@var);
WHILE there_is_a_unique_constraint_violation