update tb_template
set priority_num=i.rn
from( select temp_id tempid, rn=ROW_NUMBER()over(order by priority_num )
from tb_template)i
where i.tempid=temp_id;
重新排序字段
最新推荐文章于 2021-03-30 17:53:06 发布
update tb_template
set priority_num=i.rn
from( select temp_id tempid, rn=ROW_NUMBER()over(order by priority_num )
from tb_template)i
where i.tempid=temp_id;