// r_line_depot 表中有 orders depot_id line_id字段
// 业务逻辑:将line_id 为123 depot_id为1234的orders修改为1111 ;将line_id 为123 depot_id为1235的orders修改为2222
update r_line_depot set orders =
case when depot_id= '1234'
then '1111'
when depot_id= '1235'
then '2222'
end
where depot_id in('1234','1235') and line_id = '123'
update如何实现批量修改 where条件不同
猜你喜欢
转载自blog.csdn.net/qq_36268103/article/details/113103741
今日推荐
周排行