添加一个 r INT(10),复制一个同样结构的表

UPDATE table SET r=FLOOR(1 + (RAND() * 10800));

INSERT INTO table_copy (xxx,xxx,xxx)
SELECT xxx,xxx,xxx FROM table ORDER BY r DESC;