早睡早起,方能养生
Sleep early rise early, way to keep healthy

mysql给某个字段设置随机数值

super
2022-11-06 15:36
views 138

给table表field字段设置5000-10000之间的数

 

UPDATE `table` SET `field`=ceiling(rand()*5000+5000) WHERE id>0;

 

 



分享
0 条讨论
top