日期:2014-05-16  浏览次数:20866 次

My sql 更新表数据问题
如何在Mysql中执行以下的语句,
update cale set hvmic=hvi.hvmic
from hvi
where cale.bbarcode=hvi.clot and cale.bbarcode like '%Aod394%'
执行时报如下错
Error Code : 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'from hvi
where cale.bbarcode=hvi.clot and cale.bbarcode like '%Aod394%' ' at line 2
(0 ms taken)
请大家帮忙,谢谢

------解决方案--------------------
探讨
更新时,如两表数据相同,会不更新。
只有不同时才会更新。这点与Sql2000不同