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 ...
相關文章
相關標籤/搜索