版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u011415782/article/details/82688361
- 场景:
设置更新字段
virtual_pt_sn_count
为 3 到 9 之间(注意区间
)的随机整数
- mysql 执行语句为:
UPDATE ms_goods set virtual_pt_sn_count = FLOOR(3+(rand()*6)) where act_type = 14;
- 执行结果参考如下: