比如,一张学生表,001号学生的成绩和002号学生的成绩互换
业务逻辑业务处理,不要啥都丢到数据库来,你非要写case when也能做到
用plsql写语句块代码,然后执行。
update XX set id=999 where id=1;update XX set id=1 where id=2;update XX set id=2 where id=999;