批量更新问题。 返回

SqlSugar 沟通中
2 637

批量更新时,根据dba要求,最后的语句是 update  table set a=1 where b=2 and c=3, 但是目前的批量更新的api 都是 update select 的方式。 这个有方案解决吗

热忱回答(2)

  • 你写的SQL跟本不是批量


    如果想到  where b=2 or c=3  ,看文档:更新 (标题二)

    0 回复
  • @fate sta:批量更新一般都是update table t  inner join(数据集)  s on t.a=s.a set t.b=s.b   但是dba说这样不行,他们看不到每条数据被更新的语句。所以才有上面的提问。

    0 回复