mysql 关联更新

近期用到mysql关联更新,发现常规的写法如
update A
set A.name = 'string'
from tablea A inner join tableb B on A.id = B.id
where ...
此种写法在mysql下不正确的,mysql的写法以下
update tablea A inner join tableb B on A.id = B.id 
set A.name = 'string'
where ...
相关文章
相关标签/搜索