Doahh Doahh - 1 year ago 135
SQL Question

MySQL random string longer than 32 characters

I am trying to generate a 36 character random string in MySQL using:

UPDATE my_table SET entity_uid = substring(MD5(RAND()) FROM 1 FOR 36);

but the result is always a 32 character string. Is there a way to get a longer string?

Answer Source
UPDATE my_table SET entity_uid = UUID();
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download