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;
重新排序字段
更新模板优先级
更新模板优先级
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;

被折叠的 条评论
为什么被折叠?