sqlserver交换数据行中的指定列
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>