我有一个更新查询,我试图更新一个字段,但对于多个记录,我正在尝试一个连接,但它不起作用。下面我从select语句中得到多个值,但我认为我的语法在下面不正确。如何使用另一个表上的连接更新Oracle中的表?
UPDATE [email protected] x
INNER JOIN (
select g.prev_perm_ret, g.itm_cd
from gm_prc_reg_prc_items g, [email protected] b
where g.itm_cd=b.stylecode
and b.storecode=00000
and g.prev_perm_ret<>b.listprice
and g.prev_perm_ret>g.ret_prc
and b.sellprice=b.listprice
) y ON x.stylecode=g.itm_cd
SET x.listprice=y.prev_perm_ret
使用融为一体。 – fabribara 2014-12-06 05:16:23