2017-07-17 46 views

回答

0
select id, @rank := @rank + 1 as new_order 
from your_table 
cross join (select @rank := 0) r 
order by `order` 
+0

Thanks juergen!這工作 –