mysql 某字段插入随机数

UPDATE `表名` SET `字段名`=ceiling(rand()*500000+500000) WHERE (条件);  

写入11位手机

UPDATE xm_user a SET a.user_mobile = CONCAT('15810',ceiling(rand()*500000+500000) );

原文地址:https://www.cnblogs.com/kenshinobiy/p/4347466.html