我有2个表,喜欢用另一个表更新其中的一个.
software --------- id,purchprice softwarecost ------------ id,purchprice
我已经尝试过这些查询,但是sqlite不支持JOINS与UPDATE.anybody在那里谁可以提出一个查询为this.thanks您的帮助.
UPDATE software SET software.purchprice=softwarecost.purchprice WHERE software.id=softwarecost.id UPDATE software INNER JOIN softwarecost on software.id=softwarecost.id SET software.purchprice=softwarecost.purchprice
您必须使用相关的子查询查找相应的值:
UPDATE software SET purchprice = (SELECT purchprice FROM softwarecost WHERE id = software.id)