Mysql 多表关联执行复杂update

深碍√TFBOYSˉ_ 2021-09-23 05:20 434阅读 0赞

1

  1. update biaozhunhuamuban a
  2. inner join dept b on a.dept_id=b.id
  3. set a.path= replace(a.path,"tt平台\tt资料",b.dept_name)
  4. where a.dept_id =7

2

  1. update biaozhunhuamuban a ,dept b
  2. set a.path= replace(a.path,"tt平台\tt资料",b.dept_name)
  3. where a.dept_id=b.id and a.dept_id =7

发表评论

表情:
评论列表 (有 0 条评论,434人围观)

还没有评论,来说两句吧...

相关阅读