lundi 26 août 2019

generate random emails by rand function and seed on mysql

I have tried the following to update my emails and create some random emails, I don't know how to pick a domain name for random for my @domain.com emails. my query is wrong. could you let me know what I am doing wrong here?

update admin_user set email=CONCAT(
    substring('ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789', rand(@seed:=round(rand(@lid)*4294967296))*36+1, 5),
    (0.5 + RAND() * 6, 'live.com', 'scosche.com', 'apple.com', 'yahoo.com', 'gmail.com','mail.com'));




Aucun commentaire:

Enregistrer un commentaire