SELECT @t:=0;# 行数: 1
update tablename set 字段=(@t:=@t+1) order by rand() limit 限制条数;
mysql 随机抽取N条给某个字段顺序赋值
最新推荐文章于 2024-01-21 11:12:48 发布
SELECT @t:=0;# 行数: 1
update tablename set 字段=(@t:=@t+1) order by rand() limit 限制条数;