mysql关联更新语句

784阅读 1评论2011-12-02 桔色花花朵
分类:

近期用到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 ...

记录于此,方便日后查阅
上一篇:没有了
下一篇:mysql 数据导入错误

文章评论