在批量联表更新得写法上,mssql和mysql是不一样的。

mssql的写法是在from环节关联多表,而mysql是在update环节关联多表。

mssql写法:

update studenttmp
set t.`Name`=s.`Name`
from studenttmp t left join student s on s.Id=t.Id
where s.`Name`='qqq'

 

mysql写法:

update studenttmp t left join student s on s.Id=t.Id
set t.`Name`=s.`Name`
where s.`Name`='qqq'

 

相关文章:

  • 2021-11-30
  • 2022-02-03
  • 2022-12-23
  • 2021-08-20
  • 2021-04-21
  • 2021-09-17
  • 2022-12-23
猜你喜欢
  • 2022-01-02
  • 2021-07-03
  • 2022-12-23
  • 2021-07-25
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案