读书人

My sql 更新表数据有关问题

发布时间: 2012-02-21 16:26:23 作者: rapoo

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不同

读书人网 >Mysql

热点推荐