sqlserver交换数据行中的指定列
程序员文章站
2022-06-14 09:47:46
1 2 3 UPDATE d 4 SET d.order_num = d1.order_num 5 FROM sys_dept d 6 JOIN sys_dept... ......
1 <!-- 次序上移下移 --> 2 <update id="upordown" parametertype="java.util.map"> 3 update d 4 set d.order_num = d1.order_num 5 from sys_dept d 6 join sys_dept d1 on (d.dept_id = #{id} and d1.dept_id = #{targetid} or d.dept_id = #{targetid} and d1.dept_id = #{id}) 7 </update>
上一篇: 史上最详细 Kafka 命令行操作