首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > Mysql >

My sql 更新表数据有关问题

2012-02-21 
My sql 更新表数据问题如何在Mysql中执行以下的语句,update cale set hvmichvi.hvmicfrom hviwhere cale.

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

热点排行