我有一个名为product的表。在该表中,我想更新的一些产品ID值,但我不能这样做直接,我的“其中”条件需要根据从另一个表值来决定的记录,所以我做的:基于连接的记录的更新表值
update product set prod_active = 0 where prod_id in (
select prod_id from user_prod_sel where seltype = 100
)
这个问题我这里有这是非常缓慢的。我怎样才能把它转换成基于oin的查询,可以给我更快的结果?
任何帮助,非常感谢。
可能的重复:http://stackoverflow.com/questions/15209414/how-to-use-join-in-update-query – JanR