mysql 随机抽取N条给某个字段顺序赋值

it2025-11-02  2

SELECT @t:=0;# 行数: 1 update tablename set 字段=(@t:=@t+1) order by rand() limit 限制条数;
最新回复(0)