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

请教怎么求值?

2012-02-07 
请问如何求值??MySQL同一个数据库中有两个表:matware和matinoutmatware:fstockcode,fqty06,fwareqtymatino

请问如何求值??
MySQL
同一个数据库中有两个表:matware和matinout
matware:fstockcode,fqty06,fwareqty
matinout:fstockcode,finqty,foutqty
请问以下语法如何写:
以matware.fstockcode=matinout.fstockcode为条件,
更新matware.fwareqty=(matware.fqty06+matinout.finqty)-matinout.foutqty

[解决办法]
update matware,matinout
set matware.fwareqty=(matware.fqty06+matinout.finqty)-matinout.foutqty
where matware.fstockcode=matinout.fstockcode
[解决办法]
不對啊

热点排行